wood burning stoves*
The moose likes JDBC and the fly likes JDBC Error 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 "JDBC Error" Watch "JDBC Error" New topic
Author

JDBC Error

Varshini Priya
Ranch Hand

Joined: Feb 17, 2008
Posts: 93

Hi All,

Im trying to execute the below simple JDBC program, but Im getting the below exeception while executing it. Please Assist





The error that I received is



Exception in thread "main" java.sql.SQLException: No suitable driver found for jdbcracle:thin:@localhost:1521rcl
at java.sql.DriverManager.getConnection(Unknown Source)
at java.sql.DriverManager.getConnection(Unknown Source)
at MyFirstDBConnection.main(MyFirstDBConnection.java:21)


How do I resolve this. Please Advise, Many Thanks

Regards,
Varshini



Gamini Sirisena
Ranch Hand

Joined: Aug 05, 2008
Posts: 347
Have you put the Oracle JDBC driver in the classpath?

This usually comes in a jar named classes12.jar. You should be able to find it in your oracle software distribution media. You could check with your db admin.
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1474
    
    6



Swastik
Balu Sadhasivam
Ranch Hand

Joined: Jan 01, 2009
Posts: 874



This usually comes in a jar named classes12.jar. You should be able to find it in your oracle software distribution media. You could check with your db admin.


That is very old jar which does not even support JDBC 3 features . you must be at least using ojdbc14.jar. Check the version of oracle and choose your driver jar.




It may be the issue if you are using driver which is not JDBC 4.0 complaint. From JDBC 4.0 ,its not required to the load the driver programatically.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38519
    
  23
We usually discuss databases on a different forum. Moving.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC Error