> From: Bob Marcum [mailto:bmar...@bcscomputers.com]
> Subject: Re: Seeking the right solution to
> java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
> 
> I did a "find" scan of my system, looking for other copies of
> both hibernate3.jar and mysql-connector-java-3.1.10-bin.jar to
> confirm there are no other copies which could be in classpath.

Your find might have been a bit too specific, since you mustn't have any jars 
for any version of Hibernate or MySQL in your webapp's classloader branch, 
other than in WEB-INF/lib.

> There is a link to the mysql driver jar in hibernate-3.0's
> own lib directory.

What do you mean by "hibernate-3.0's own lib directory"?  Is this a link 
somehow inside the Hibernate jar?  Are the Hibernate classes somewhere else 
besides the jar in WEB-INF/lib?

> When I re-run the application, I am right back where I was. I
> get "java.lang.ClassNotFoundException: com.mysql.jdbc.Driver".

What's in the <Context> element for your webapp?  Since you're using C3P0 
pooling, you should not have a <Resource> element inside the <Context>, 
otherwise Tomcat will also attempt to do pooling for the driver.

> My webapp cannot see the mysql driver jar, although it clearly 
> sees the hibernate jar.

Post the complete stack trace for the CNFE.

Still sounds like you've got another copy or version of the MySQL jar around, 
causing classloader conflicts.

 - Chuck


THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY 
MATERIAL and is thus for use only by the intended recipient. If you received 
this in error, please contact the sender and delete the e-mail and its 
attachments from all computers.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to