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  java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark " java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp" Watch " java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp" New topic
Author

java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp

Ranjeet Deshmukh
Greenhorn

Joined: Jan 18, 2013
Posts: 24

Hi all,

I was trying to do JDBC using following code,



Then I got following exception,

Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at test.JDBCDemo.main(JDBCDemo.java:21)




[Thumbnail for Capture.PNG]


~R@njeet.
Ranjeet Deshmukh
Greenhorn

Joined: Jan 18, 2013
Posts: 24

Hey that was my mistake, I wrote



Actually it should be -



only ":" was missing after mysql.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: java.sql.SQLException: No suitable driver found for jdbc:mysql//localhost:3306/emp
 
Similar Threads
JDBC, mysql connector/j, face a problem to connect mysql 5.1 and JSE.
connecting to sql file
JDBC + Localhost
connection problem
JDBC Error