Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

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

 
Jonathan Whitehead
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Brett, now I have two solutions to my problem!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic