This week's book giveaway is in the Other Languages forum.
We're giving away four copies of Functional Reactive Programming and have Stephen Blackheath and Anthony Jones on-line!
See this thread for details.
Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

mysql driver classpath How to plz?

 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try this on the command line:

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.
 
Gul Khan
Ranch Hand
Posts: 173
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks David. there was a typo in the classpath.
but just wondering y was i getting the connection in tomcat at some places. :roll:
 
Marilyn de Queiroz
Sheriff
Posts: 9067
12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Servlets and JSPs don't use the mySQL driver if the servlets and JSPs don't use JDBC.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic