installed jdk 1.5 from jdk 1.4 on Tomcat server environment. My JDBC connection with my driver was working fine until I installed the new java version. What has changed since 1.4?
Here's the error message: java.sql.SQLException: Cannot load JDBC driver class 'org.gjt.mm.mysql.Driver' at org.apache.commons.dbcp.BasicDataSource.createDataSource(BasicDataSou rce.java:529) at org.apache.commons.dbcp.BasicDataSource.getConnection(BasicDataSource .java:312) at com.wrox.tourism.db.util.DBInitServlet.init(DBInitServlet.java:34) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper. java:1044) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:88 7) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContex t.java:3820)
Just needed to place that "mysql-connector-java-3.0.16-ga.jar" file into my JAVA_HOME\jre\lib\ext directory. The downfall of this though is that I might forget again when upgrading java versions again. The best thing for me to do is set it in my classpath environment.
Are you setting up a connection pool through Tomcat?
If so, I think you are supposed to have the jar file in the Tomcat common/lib directory. There are some subtle issues with class loading when using an application server, see if you can find some more information on setting up classpath for Tomcat.