You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Jesse Keller <je...@aya.yale.edu> on 2003/04/08 19:00:36 UTC

Re: Basic JNDI setup problems - "Cannot load JDBC driverclass'null'"

Thanks for the advice, Paul, but it looks like I'm not done yet -- I've just
switched the server.xml file:

    <!-- Class name for mm.mysql JDBC driver -->
    <parameter>
       <name>driverClassName</name>
       <value>com.mysql.jdbc.Driver</value>
    </parameter>

and restarted tomcat, but still no luck.




----- Original Message -----
From: "paul niemandt" <ma...@acesurfer.co.za>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, April 08, 2003 12:44 PM
Subject: Re: Basic JNDI setup problems - "Cannot load JDBC
driverclass'null'"


> Yeah: I would go with John on that: I don't use windows myself, so not
> too sure, but I would definitely install Tomcat under something like
> c:\tomcat rather than the full c:\program files\apache group\ kinda
> thingy.
>
> On the other hand, I had no success using org.gjt.mm.Driver, it was only
> when I changed to com.mysql.jdbc.Driver that my servlet picked up the
> driver.
>
> {I used the mysql-connector-java-2.0.14 driver set}
>
> regards,
> Paul

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


Re: Basic JNDI setup problems - "Cannot load JDBCdriverclass'null'"

Posted by Jesse Keller <je...@aya.yale.edu>.
yeah, I've got
c:\tomcat\common\lib\mysql-connector-java-3.0.6-stable-bin.jar

I'll try the debug setting, and see what that tells me. The weird thing is
that I know the driver is there, and that it works, because I can use it
just fine when I don't try to do dbcp:

Class.forName("org.gjt.mm.mysql.Driver").newInstance();
conn = DriverManager.getConnection(DBUrl,"root","newpass");
stmt = conn.createStatement();
ResultSet rs = stmt.executeQuery(stringSQL);

Question is, what's different about calling getConnection() this way instead
of the other way?

----- Original Message -----
From: "paul niemandt" <ma...@acesurfer.co.za>
To: "Tomcat Users List" <to...@jakarta.apache.org>
Sent: Tuesday, April 08, 2003 1:20 PM
Subject: Re: Basic JNDI setup problems - "Cannot load JDBCdriverclass'null'"


> OK: Sorry if I'm repeating a previous question or stating the obvious:
> but do you have a mysql-connector-java-xxx-bin.jar in
> c:\tomcat\common\lib ? This is the only real explanation I can think of
> now: The config looks correct, it's the same as mine, and mine does
> work!
>
> you can also set your debugging to full {change debug="0" to debug="100"
> wherever you can find it, and then scan the logs to see which libraries
> are loaded)
>
> On Tue, 2003-04-08 at 18:00, Jesse Keller wrote:
> > Thanks for the advice, Paul, but it looks like I'm not done yet -- I've
just
> > switched the server.xml file:
> >
> >     <!-- Class name for mm.mysql JDBC driver -->
> >     <parameter>
> >        <name>driverClassName</name>
> >        <value>com.mysql.jdbc.Driver</value>
> >     </parameter>
> >
> > and restarted tomcat, but still no luck.
> >
> >
> >
> >
> > ----- Original Message -----
> > From: "paul niemandt" <ma...@acesurfer.co.za>
> > To: "Tomcat Users List" <to...@jakarta.apache.org>
> > Sent: Tuesday, April 08, 2003 12:44 PM
> > Subject: Re: Basic JNDI setup problems - "Cannot load JDBC
> > driverclass'null'"
> >
> >
> > > Yeah: I would go with John on that: I don't use windows myself, so not
> > > too sure, but I would definitely install Tomcat under something like
> > > c:\tomcat rather than the full c:\program files\apache group\ kinda
> > > thingy.
> > >
> > > On the other hand, I had no success using org.gjt.mm.Driver, it was
only
> > > when I changed to com.mysql.jdbc.Driver that my servlet picked up the
> > > driver.
> > >
> > > {I used the mysql-connector-java-2.0.14 driver set}
> > >
> > > regards,
> > > Paul

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


Re: Basic JNDI setup problems - "Cannot load JDBC driverclass'null'"

Posted by paul niemandt <ma...@acesurfer.co.za>.
OK: Sorry if I'm repeating a previous question or stating the obvious:
but do you have a mysql-connector-java-xxx-bin.jar in
c:\tomcat\common\lib ? This is the only real explanation I can think of
now: The config looks correct, it's the same as mine, and mine does
work!

you can also set your debugging to full {change debug="0" to debug="100"
wherever you can find it, and then scan the logs to see which libraries
are loaded)

On Tue, 2003-04-08 at 18:00, Jesse Keller wrote:
> Thanks for the advice, Paul, but it looks like I'm not done yet -- I've just
> switched the server.xml file:
> 
>     <!-- Class name for mm.mysql JDBC driver -->
>     <parameter>
>        <name>driverClassName</name>
>        <value>com.mysql.jdbc.Driver</value>
>     </parameter>
> 
> and restarted tomcat, but still no luck.
> 
> 
> 
> 
> ----- Original Message -----
> From: "paul niemandt" <ma...@acesurfer.co.za>
> To: "Tomcat Users List" <to...@jakarta.apache.org>
> Sent: Tuesday, April 08, 2003 12:44 PM
> Subject: Re: Basic JNDI setup problems - "Cannot load JDBC
> driverclass'null'"
> 
> 
> > Yeah: I would go with John on that: I don't use windows myself, so not
> > too sure, but I would definitely install Tomcat under something like
> > c:\tomcat rather than the full c:\program files\apache group\ kinda
> > thingy.
> >
> > On the other hand, I had no success using org.gjt.mm.Driver, it was only
> > when I changed to com.mysql.jdbc.Driver that my servlet picked up the
> > driver.
> >
> > {I used the mysql-connector-java-2.0.14 driver set}
> >
> > regards,
> > Paul
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tomcat-user-help@jakarta.apache.org
-- 
paul niemandt <ma...@acesurfer.co.za>


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