944,062 Members | Top Members by Rank

Ad:
  • JSP Discussion Thread
  • Unsolved
  • Views: 3878
  • JSP RSS
Oct 14th, 2006
0

JSP with MySql

Expand Post »
Hi I'm using JSP with Mysql.The Compile time no error.but in the run time the exception has been thrown,

java.lang.ClassNotFoundException: org.gjt.mm.mysql.Driver

i've set the classpath as well and i've attached jar file in the tomcat lib directory


These are the class path settings

C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\servlet-api.jar;C:\Program Files\Apache Software Foundation\Tomcat 5.5\common\lib\jsp-api.jar;C:\Program Files\Java\jre1.5.0_07\lib\ext\QTJava.zip;C:\Program Files\javamail-1.4\lib\mailapi.jar;C:\Program Files\javamail-1.4\lib\dsn.jar;C:\Program Files\javamail-1.4\lib\imap.jar;C:\Program Files\javamail-1.4\lib\pop3.jar;C:\Program Files\javamail-1.4\lib\smtp.jar;C:\Program Files\javamail-1.4\mail.jar;C:\Program Files\jaf-1.1\activation.jar;C:\Program Files\mysql-connector-java-5.0.3\mysql-connector-java-5.0.3-bin.jar;C:\Program Files\mysql-connector-java-5.0.3\src\lib\;C:\Program Files\mysql-connector-java-5.0.3\src\org\gjt\mm\mysql\;.


pls give some suggestion if i made any mistake
thanks in advance
regards
rex
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
casimirrex is offline Offline
1 posts
since Oct 2006
Oct 27th, 2006
0

Re: JSP with MySql

Did you include the drive in your java code?
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamus is offline Offline
11 posts
since Oct 2006
Oct 27th, 2006
0

Re: JSP with MySql

Click to Expand / Collapse  Quote originally posted by iamus ...
Did you include the drive in your java code?
Not sure what you mean. If you are hinting at importing driver classes in the code, it is not required. But if you mean having the driver JAR in the classpath, it should be in the Tomcat common lib. The workstation environment is ignored by Tomcat.

Part of my reply is addressing the original post.
Last edited by aniseed; Oct 27th, 2006 at 6:09 pm. Reason: Edited for clarification
Reputation Points: 48
Solved Threads: 7
Posting Whiz
aniseed is offline Offline
353 posts
since Apr 2006
Oct 28th, 2006
0

Re: JSP with MySql

need to create an instance for it, that's what I meant

something like
[PHP]
Class.forName("org.gjt.mm.mysql.Driver").newInstance();

or depends on the drive name[/PHP]
Reputation Points: 10
Solved Threads: 0
Newbie Poster
iamus is offline Offline
11 posts
since Oct 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in JSP Forum Timeline: print without dialog box using javascript
Next Thread in JSP Forum Timeline: JSP, mysql, and character encoding





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC