• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

driver class problem

 
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm trying to run an application on Tomcat. It fails to run, throwing a null driver class exception. I've already copied a jar file with a Db2 driver class (I'm using Db2 database) into Tomcat's /common/lib directory. But it still throws the same exception. What might be the problem here?
The exception is:
java.sql.SQLException Cannot load JDBC driver class 'null'
at org.apache.commons.dbpc.BasicDataSource.createDataSource(...)
at org.apache.commons.dbpc.BasicDataSource.getConnection(...)
etc...

--------------------
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would interpret this error:

java.sql.SQLException Cannot load JDBC driver class 'null'


as a null reference being supplied in your code where you expect to have a String with a fully qualified class name.
If it was my problem I would try to print out or log the name of the driver class just before you call createDataSource.
Bill
 
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You are mistaking quantity for quality.

This is the 3rd time you've asked this question, without any increase in the level of detail you are offering.

If you're not getting the answer you want:

1) provide more details about your settings or code
2) do so in the *same* thread, and don't start a new one.

Thanks.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic