aspose file tools*
The moose likes Servlets and the fly likes TOMCAT remind me where to put jar files (can't find MySQL driver) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "TOMCAT remind me where to put jar files (can Watch "TOMCAT remind me where to put jar files (can New topic
Author

TOMCAT remind me where to put jar files (can't find MySQL driver)

Jonathan Whitehead
Greenhorn

Joined: Jun 13, 2001
Posts: 10
Hi
TOMCAT remind me where to put jar files (can't find MySQL driver)

OK, I've been putting JAR files in web-inf/classes just like Tomcat seems to like it, and suddenly the line
Class.forName(jdbcDriver)
(which occurs not in a JSP but a JAVA class called by a bean which is used by the JSP) throws the exception
java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver
I've checked about 11 times that the jar file containing this class is in web-inf/classes
Thanks for any ideas
Jonathan
Jonathan Whitehead
Greenhorn

Joined: Jun 13, 2001
Posts: 10
PS 1 it USED to work
PS 2 now I copied mm.mysql-2.0.4-bin.jar to $TOMCAT_HOME/lib as well, and restarted TOMCAT, and still it doesn't work.
Brett B Doehr
Greenhorn

Joined: Jun 04, 2001
Posts: 11
Jonathan,
Individual class files go into WEB-INF/classes. However, .jar and .zip files go into WEB-INF/lib. Try creating WEB-INF/lib and putting your .jar file in there.
--Brett.
Jonathan Whitehead
Greenhorn

Joined: Jun 13, 2001
Posts: 10
Problem solved.
Thank you everyone for reading this far.
It works now that I have correctly copied the MySQL driver jar file into $TOMCAT_HOME/lib
Jonathan Whitehead
Greenhorn

Joined: Jun 13, 2001
Posts: 10
Thanks Brett, now I have two solutions to my problem!
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: TOMCAT remind me where to put jar files (can't find MySQL driver)