This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread 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 OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA 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