This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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: 155

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: 155

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: 155

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.
 
Don't get me started about those stupid light bulbs.
 
subject: ClassNotFoundException: com.mysql.jdbc.Driver