tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Herold" <her...@cotagesoft.com>
Subject RE: tomcat 4.1.12 JDBC driver class 'null'
Date Wed, 02 Oct 2002 16:05:04 GMT
I've tried it as both driverName and url.  Neither work.  Besides, the docs
say that drivername will continue to be supported for backward
compatibility - see the end of section 4 in the "JDBC Data Sources" topic in
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-resources-howto.html

-- bob

-----Original Message-----
From: tomcat-user-return-35952-herold=cotagesoft.com@jakarta.apache.org
[mailto:tomcat-user-return-35952-herold=cotagesoft.com@jakarta.apache.or
g]On Behalf Of Raj Saini
Sent: Wednesday, October 02, 2002 1:07 AM
To: Tomcat Users List
Subject: Re: tomcat 4.1.12 JDBC driver class 'null'


There is an error in your datasource configureation. The DriveName
element is changed to url in 4.1.12

<parameter>
   <name>driverName</name>
   <value>jdbc:oracle:thin:@localhost:1521:ctg</value>
</parameter>

should be

<parameter>
   <name>url</name>
   <value>jdbc:oracle:thin:@localhost:1521:ctg</value>
</parameter>

Raj


Robert Herold wrote:
> I've been happily using tomcat 4.0.4 for a while, and thought I'd upgrade
to
> version 4.1.12.  Alas, I cannot get tomcat to find my Oracle JDBC driver
> when I use 4.1.12.  It worked fine in 4.0.4.
>
> Any ideas what might be wrong?
>
> My classes12.jar is in common/lib where it is supposed to be.  It's the
same
> file as I used under tomcat 4.0.4, so it is known to be good.
>
> I followed the configuration steps for setting up the JNDI Datasource very
> carefully.
>
> The exception I get is:
>
> Caused by: java.sql.SQLException: Cannot load JDBC driver class 'null'
> 	at
>
org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSource.jav
> a:529)
> 	at
>
org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource.java:3
> 12)
> 	at com.cotagesoft.common.XDataSource.getConnection(XDataSource.java:107)
> 	... 31 more
>
> My resource definition in server.xml is:
>
>      <DefaultContext debug="0" reloadable="true">
>        <Resource name="jdbc/CotagesoftDB" auth="Container"
>                   type="javax.sql.DataSource"/>
>         <ResourceParams name="jdbc/CotagesoftDB">
>          <parameter>
>            <name>factory</name>
>            <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
>          </parameter>
>          <parameter>
>            <name>username</name>
>            <value>fred</value>
>          </parameter>
>          <parameter>
>            <name>password</name>
>            <value>fred</value>
>          </parameter>
>          <parameter>
>            <name>driverClassName</name>
>            <value>oracle.jdbc.driver.OracleDriver</value>
>          </parameter>
>          <parameter>
>            <name>driverName</name>
>            <value>jdbc:oracle:thin:@localhost:1521:ctg</value>
>          </parameter>
>          <parameter>
>            <name>maxActive</name>
>            <value>20</value>
>          </parameter>
>          <parameter>
>            <name>maxIdle</name>
>            <value>10</value>
>          </parameter>
>          <parameter>
>            <name>maxWait</name>
>            <value>-1</value>
>          </parameter>
>        </ResourceParams>
>       </DefaultContext>
>
> And it is referenced in web.xml with:
>
>   <resource-ref>
>
>     <description>
>       Resource reference to a factory for java.sql.Connection
>       instances that may be used for talking to a particular
>       database that is configured in the server.xml file.
>     </description>
>
>     <res-ref-name>jdbc/CotagesoftDB</res-ref-name>
>     <res-type>javax.sql.DataSource</res-type>
>     <res-auth>Container</res-auth>
>
>   </resource-ref>
>
> Any ideas on what to try would be appreciated.  Thanks.
>
> -- bob
>
> ----------
> Robert Herold
> Cotagesoft, Inc.
> 650 474 9013 x808
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>
>



--
To unsubscribe, e-mail:
<mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail:
<mailto:tomcat-user-help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:tomcat-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:tomcat-user-help@jakarta.apache.org>


Mime
View raw message