The moose likes Tomcat and the fly likes driver class problem Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Reply Bookmark "driver class problem" Watch "driver class problem" New topic
Author

driver class problem

Nhlanhla Dlamini
Greenhorn

Joined: Jul 31, 2002
Posts: 12
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...

--------------------


nnd
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 11863
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


Java Resources at www.wbrogden.com
Mike Curwen
Ranch Hand

Joined: Feb 20, 2001
Posts: 3695

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.
 
 
subject: driver class problem
 
Threads others viewed
null driver class exception
driver class problem
driver class problem
driver class problem
StaleConnectionException
IntelliJ Java IDE