File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes What is this No Suitable Driver exception? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "What is this No Suitable Driver exception? " Watch "What is this No Suitable Driver exception? " New topic

What is this No Suitable Driver exception?

Ja vardhan
Ranch Hand

Joined: May 09, 2005
Posts: 169

When I am using the code:


getting No Suitable Driver SQL Exception.

When I am using other driver:


getting the exception java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver.

I am writing just simple program trying to connect to Oracle database.
But I am gettign exception with Class.forName() method as specified above.

What might be the problem?
We need to have installed any driver on our machine when we are using connection driver?
What are the basic requirements when we are writing JDBC program?

Please post your ideas.


Emanuel Kadziela
Ranch Hand

Joined: Mar 24, 2005
Posts: 187
You certainly need at least a jar in your classpath with the driver classes in it.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42959
In the case of the Oracle driver, you're missing the class in your classpath, as was suggested before. In the case of the JDBC/ODBC bridge, it sounds like the URL you're using to access the DB is incorrect.
I agree. Here's the link:
subject: What is this No Suitable Driver exception?
jQuery in Action, 3rd edition