Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Ivan Jouikov
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi!
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:
server.xml:


$CATALINA_HOME/common/lib:
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
 
Ivan Jouikov
Ranch Hand
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 269
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
oh yeah, a few things I forgot:
CLASSPATH contains an entry for mysql-connector.jar
web.xml contains the following regarding the database:
<!-- Database -->
<resource-ref>
<description>DB Connection</description>
<res-ref-name>jdbc/marina</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic