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 No Suitible Driver Error 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 "No Suitible Driver Error" Watch "No Suitible Driver Error" New topic
Author

No Suitible Driver Error

Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

Here is my code:

It compiles and then when I run it I just get an SQLException: No Suitable Driver
Help anyone?


GenRocket - Experts at Building Test Data
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
I am guessing it just can't find the driver for mySQL. It's either your class path is not set correctly or you have not downloaded the drivers.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Gregg Bolinger
GenRocket Founder
Ranch Hand

Joined: Jul 11, 2001
Posts: 15299
    
    6

I had figured it out over the weekend. I did download the drivers and put them in the appropriate folders. However, my JAVA Editor was over-riding my CLASSPATH that I had set. So I had to set the CLASSPATH inside my editor.
All fixed.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: No Suitible Driver Error