wood burning stoves 2.0*
The moose likes JDBC and the fly likes Cannot load JDBC driver class 'null'  ... WTF? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Cannot load JDBC driver class Watch "Cannot load JDBC driver class New topic

Cannot load JDBC driver class 'null' ... WTF?

Ivan Jouikov
Ranch Hand

Joined: Jul 22, 2003
Posts: 269
I been developing an app on my machine using com.mysql.jdbc.Driver .... Everything seems fine -- when I deploy it on my machine and test it everything works just perfectly...
However when I uploaded it to the server, I began to get the following exception:
"Cannot load JDBC driver class 'null'" whenever I tried to call DataSource's getConnection() method... Here's the basic structure of my app on the final server:

mysql connector.jar lies here with the driver
Here's the database manager (Manager.java):

And here's the file I use to test that crap:

.. anybody has any ideas why is this happening?
It didn't happen on my home machine but it's happening on server...
JVM is 1.4.x and tomcat is 4.1
Thank you in advance, your help is GREATLY appreciated,
Ivan Jouikov
Ranch Hand

Joined: Jul 22, 2003
Posts: 269
BTW, mysql contains the the valid user with the valid password @ my host with all privileges set to him and access to all the databases.
Ivan Jouikov
Ranch Hand

Joined: Jul 22, 2003
Posts: 269
oh yeah, a few things I forgot:
CLASSPATH contains an entry for mysql-connector.jar
web.xml contains the following regarding the database:
<!-- Database -->
<description>DB Connection</description>
I agree. Here's the link: http://aspose.com/file-tools
subject: Cannot load JDBC driver class 'null' ... WTF?
Similar Threads
Static Connection object in BaseDAO class - Bad?
Connection pooling using Tomcat
Tomcat can't find my JDBC Resource !!!
a mistake for bean
Connection problem via jdbc:odbc Ingres 2.6