Hi jake, You woll need to define a context under a Tomcat-Apache service. I belive you are using the context defined in the Stand-Alone service. you must have a virtual host and your context under this virtual host.
I hope this helps you. Raj Jake Tweer wrote: > I'm getting the same error with MySQL and I've seen posts for > PostgreSQL, MySQL and Oracle. I have followed all suggestions with no > luck except for one case - the example given in the JNDI - How To works > for me. The example is using standalone Tomcat and that works. As soon > as I use Apache/mod_webapp I get the exception Cannot load JDBC driver > class 'null'. > > > > 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:[EMAIL PROTECTED]> >> For additional commands, e-mail: >> <mailto:[EMAIL PROTECTED]> >> >> >> > > > > -- > To unsubscribe, e-mail: > <mailto:[EMAIL PROTECTED]> > For additional commands, e-mail: > <mailto:[EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>