« Ken Hygh's talk at... | Main | Mike is stirring up... »

Cannot load JDBC driver class 'null'

As Jon Lipsky found, Tomcat DBCP configuration is the thorn in the side of Roller. Everybody seems to have problems with it. I need to do some research to figure out that Cannot load JDBC driver class 'null' means, because several users have been running into the same problem. Since Hibernate provides it's own connection pooling, configured by a simple properties file, perhaps we should drop DBCP from the standard Roller/Tomcat setup. Either way, I should add the alternate Hibernate configuration to the Wiki.

Comments:

What kind of JDBC driver are you using? Anyway, if its a native driver, you can't unload it. Its a java issue.

Posted by Carlos E. Perez on April 30, 2003 at 06:32 PM EDT #

I've gotten this error when the driver.jar is not in $CATALINA_HOME/common/lib. I've also seen it when you try to define a context path="" and don't put your app in docroot="ROOT". Most of the time I've seen this error - everything still works, but the error appears on startup. This is currently happening on my struts-resume demo app (http://raibledesigns.com/resume), but the error doesn't affect the functionality of the web at all.

Posted by Matt Raible on April 30, 2003 at 07:41 PM EDT #

I've just installed Roller yesterday and had this problem. For me it boiled down to the way my hosts were configured. I had to re-arrange the contexts in my server.xml until it worked. I think it is some classloader issue that must occur between the different contexts. There are a couple of bugs already logged about this with Tomcat with quite a few votes. Nothing much seems to be happening though.

Posted by Daniel Bradby on April 30, 2003 at 09:30 PM EDT #

If you're using MySQL, you might want to check your driver name. If you're using "org.gjt.mm.mysql.Driver", you need "mm.mysql-2.0.14-bin.jar" in $CATALINA_HOME/common/lib. If you're using "com.mysql.jdbc.Driver" (the newer one from mysql.com), then you need "mysql-connector-java-2.0.14-bin.jar" in $CATALINA_HOME/common/lib. Maybe this is the problem??

Posted by Matt Raible on May 01, 2003 at 12:36 AM EDT #

Sadly not that easy :( When you tweak a context tag in server.xml and the problem goes away ..... and I actually started using MySQL but stuck with Postgresql. I had the same problem with both drivers.

Posted by Daniel Bradby on May 01, 2003 at 04:38 AM EDT #

That's generally a classpath issue. Try poking around with which of the various classloaders within Tomcat are loading DBCP, the libraries it depends upon, and your JDBC driver.

Posted by Unknown on May 01, 2003 at 04:27 PM EDT #

Post a Comment:
  • HTML Syntax: NOT allowed

« Ken Hygh's talk at... | Main | Mike is stirring up... »

Welcome

This is just one entry in the weblog Blogging Roller. You may want to visit the main page of the weblog

Related entries

Below are the most recent entries in the category Roller, some may be related to this entry.