You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by "v.siguier" <v....@voila.fr> on 2003/08/04 14:58:42 UTC

DataSource + Oracle + Tomcat

Hello,

I try to connect to Oracle 8.1.7 using a DataSource (Tomcat 4.1.24).
In the code, my datasource object is not null (Oracle driver have been founded) but on 
getConnection method I have the following error message :

"org.apache.commons.dbcp.DbcpException: java.sql.SQLException: invalid arguments in call" (the exception is generated in 
French, maybe my translation is not exact)

Following is server.xml part :
                       --------------
<ResourceParams name="jdbc/app/geode">
          <parameter>
                   <name>user</name>
                   <value>user</value>
          </parameter>
          <parameter>
                   <name>password</name>
                   <value>password</value>
          </parameter>
          <parameter>
                   <name>driverClassName</name>
                   <value>oracle.jdbc.driver.OracleDriver</value>
          </parameter>
          <parameter>
                   <name>driverName</name>
                   <value>jdbc:oracle:thin:@xxxxxxxx:1521:xxxxxx</value>
          </parameter>
</ResourceParams>

Following is web.xml part :
                       -----------
<resource-ref>
          <description>gfds</description>
          <res-ref-name>jdbc/app/geode</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
</resource-ref>

Following is my code to obtain a connection :
Context envGlobal = new InitialContext();
Context envApp = (Context)envGlobal.lookup("java:comp/env");
DataSource m_oJdbcDataSource = ( DataSource )envApp.lookup("jdbc/app/geode");
Connection l_connect = m_oJdbcDataSource.getConnection();

I don't understand what are these invalid arguments, somebody can help me ?
Thank you.

------------------------------------------

Faites un voeu et puis Voila ! www.voila.fr