tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aguirre, Carlos (C.)" <cagui...@visteon.com>
Subject RE: Cannot load JDBC driver class 'null'
Date Thu, 24 Apr 2003 16:56:09 GMT
it is actually there and it's available, I'm proving this with this code:

  <%
    foo.DBTest tst = new foo.DBTest();
    tst.init();
    java.sql.Driver drv = new org.gjt.mm.mysql.Driver();
  %>

  <h2>Results</h2>
    Foo: <%= tst.getFoo() %><br/>
    Bar: <%= tst.getBar() %><br/>
    Driver: <%= drv.getMajorVersion()%>
  </body>

this is the output:

Results
Foo: Cannot load JDBC driver class 'null'
Bar: -1
Driver: 2 /// here the driver is loaded..

Thanks. 

> -----Original Message-----
> From: Jacob Kjome [mailto:hoju@visi.com]
> Sent: Thursday, April 24, 2003 10:52 AM
> To: Tomcat Users List
> Subject: Re: Cannot load JDBC driver class 'null'
> 
> 
> 
> Make sure the jar containing your MySQL driver is under 
> CATALINA_HOME/common/lib.  It has to be there or DBCP won't see it.
> 
> Jake
> 
> At 12:11 PM 4/24/2003 -0400, you wrote:
> >Hi all
> >I'm trying to configure the datasource example from the 
> tomcat-docs, JNDI
> >DataSource HOW-TO, for MySQL, but I'm getting the "Cannot 
> load JDBC driver
> >class 'null'" error. I'm sure  the driver is loaded....
> >
> >here is a code snip from server.xml for apache tomcat 4.1
> >
> ><Resource name="jdbc/dbtest" auth="Container"
> >                                 type="javax.sql.DataSource">
> >         </Resource>
> >                         <ResourceParams name="jdbc/dbtest">
> >
> >                                 <Parameter>
> >                                   <name>factory</name>
> >
> ><value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
> >                                 </Parameter>
> >                                 <Parameter>
> >                                   <name>driverClassName</name>
> >                                   
> <value>org.gjt.mm.mysql.Driver</value>
> >                                 </Parameter>
> >                                 <Parameter>
> >                                   <name>url</name>
> >
> ><value>jdbc:mysql:///javatest?autoReconect=true</value>
> >                                 </Parameter>
> >                                 <Parameter>
> >                                   <name>maxActive</name>
> >                                   <value>100</value>
> >                                 </Parameter>
> >                                 <Parameter>
> >                                   <name>maxIdle</name>
> >                                   <value>30</value>
> >                                 </Parameter>
> >                                 <Parameter>
> >                                   <name>username</name>
> >                                   <value>javauser</value>
> >                                 </Parameter>
> >                                 <Parameter>
> >                                   <name>password</name>
> >                                   <value>javadude</value>
> >                                 </Parameter>
> >                         </ResourceParams>
> >
> >
> >can anyone help me???
> >
> >thanks.
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> >For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
> 

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


Mime
View raw message