The exception you see is an indication that the factory doesn't see the ResourceParams you have specified. Try to print out the url and driverClassName properties of BasicDataSource, you will see they are null.

You have an extra </ResourceParams> tag there in your definition of the server.xml file. Is that just a copy/paster error?
Maybe you can post the whole <context>


You should also try without a <resource-ref> in web.xml.

By the way, questions about DBCP are best posted on commons-user mailing list. http://jakarta.apache.org/commons/dbcp/mail-lists.html

-- Dirk

Ed Dowgiallo wrote:
I'm running into the following exception when issuing a getConnection to an Oracle DataSource.
SQLException: Cannot create JDBC driver of class '' for connect URL 'null'
It has the following definition in a Tomcat 4.1.29 server.xml file.


<Resource name="Library" auth="Container" scope="Shareable" type="javax.sql.DataSource"/>

</ResourceParams>

<ResourceParams name="Library">

<parameter>

<name>factory</name>

<value>org.apache.commons.dbcp.BasicDataSourceFactory</value>

</parameter>

<parameter>

<name>driverClassName</name>

<value>oracle.jdbc.driver.OracleDriver</value>

</parameter>

<parameter>

<name>url</name>

<value>jdbc:oracle:thin:@192.168.0.202:1521:tpeds002</value>

</parameter>

<parameter>

<name>username</name>

<value>abc</value>

</parameter>

<parameter>

<name>password</name>

<value>xyz</value>

</parameter>

<parameter>

<name>maxActive</name>

<value>25</value>

</parameter>

<parameter>

<name>maxIdle</name>

<value>10</value>

</parameter>

<parameter>

<name>maxWait</name>

<value>-1</value>

</parameter>

</ResourceParams>

I have setup the following resource-ref in the applications web.xml file.

  <resource-ref>
    <description>Oracle DataSource</description>
    <res-ref-name>Library</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
  </resource-ref>

The JDBC library is a class12.jar file in the Tomcat shared/lib directory.

Comments and suggestions are most welcome.

Thank you,

Ed


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to