• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Junilu Lacar
  • Paul Clapham
  • Knute Snortum
Saloon Keepers:
  • Stephan van Hulst
  • Ron McLeod
  • Tim Moores
  • salvin francis
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Vijitha Kumara

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

 
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>
 
I knew I would regret that burrito. But this tiny ad has never caused regrets:
global solutions you can do at home or in your backyard
https://www.kickstarter.com/projects/paulwheaton/better-world-boo
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!