I am getting a ClassNotFoundException when i try to connect to database from my java class. It works fine with servlets and jsp. I have installed the driver in my G:Tomcat/common/lib and the classpath is also set G:Tomcat\common\lib\mysql-connector-java-3.0.8-stable-bin.jar;. The error it gives is ClassNotFoundException: org.gjt.mm.mysql.Driver What should i do to avoid this problem [ September 21, 2003: Message edited by: pervaiz gul ]
Firstly, is there a typo in your classpath? should it be g:/tomcat instead of g:tomcat. Also, you can open the jar in Winzip or similar program to make sure the Driver exists in the same place. I'm not sure this is the right Driver for this jar file, but then it's been a while since I used MySQL.
Joined: Sep 03, 2003
Thanks David. there was a typo in the classpath. but just wondering y was i getting the connection in tomcat at some places. :roll: