File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes ClassNotFoundException: com.mysql.jdbc.Driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ClassNotFoundException: com.mysql.jdbc.Driver" Watch "ClassNotFoundException: com.mysql.jdbc.Driver" New topic
Author

ClassNotFoundException: com.mysql.jdbc.Driver

Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 165

First of all am very new to all this and I did try searching for the solution on the net but couldn't find anything. What am trying to do it to fetch data from the mysql database and its throwing ClassNotFoundException: com.mysql.jdbc.Driver exception. Please help what can I do? Here's my code

1. The HTML Page


1. The Servlet




Please tell me where am going wrong???
Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 165

I've heard that the class path needs to be set up so how would I do that? I'm using net beans??
Pranit Sonawane
Ranch Hand

Joined: Jul 29, 2011
Posts: 165

Am sorry for this thread as I forgot to add mysql connector jar file to the project. I've done that and now its working fine.
 
 
subject: ClassNotFoundException: com.mysql.jdbc.Driver