Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

No suitable driver found for jdbc:oracle:oci:@

581160Jun 12 2007 — edited Jun 13 2007
Hello, I am able to compile my java program and run it. If I create an executable jar
and try to run it I get an error - No suitable driver found for jdbc:oracle:oci:@.

The classpath = .;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;;C:\oracle\ora92\jdbc\lib\ojdbc14.jar;C:\Program Files\Java\jdk1.6.0\bin;C:\Program Files\Java\jre1.6.0_01\bin

I load the driver using this code.
//load the oracle JDBC Driver.
Class.forName("oracle.jdbc.driver.OracleDriver");

And try to get a connection using this code
conn = DriverManager.getConnection("jdbc:oracle:oci:@", userIdTextField.getText(), PasswordField.getText() );

I have tried classes11 and classes12 jar files but same error.
I get the same error if I set the classpath at run time with -classpath.

Any ideas or suggestions would be a great help. I have been trying to solve this for 2 days.

Thanks
Sami
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jul 11 2007
Added on Jun 12 2007
1 comment
3,555 views