Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java.sql.SQLException: No suitable driver

 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi
I am trying to do simple jdbc program


can anybody help me to come out?

Thanks

Vaishali
 
Jared White
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the jar containing your JDBC driver in your classpath?
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
please can you tell me which jar file is needed in classpath.

I am using oracle 10g.

Thanks

Vaishali
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's called classes12.jar or ojdbc-14.jar for Oracle.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yes it has in classpath

"c:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\nls_charset12.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\classes12.jar"

Then also its giving error.


Thanks

Vaishali
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15482
43
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The error message means that either the JDBC driver is not in your classpath, or that the database URL you are using is wrong. Looking at your code, I see that the database URL you are using is "jdbcdbcracle". Are you trying to use the JDBC-ODBC bridge driver to access Oracle?

See this question in the Oracle JDBC FAQ about what the database URL should look like.
 
Vaishali Paramane
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi

"c:\oracle\product\10.2.0\db_1\jdbc\lib\ojdbc14.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\nls_charset12.jar";
"c:\oracle\product\10.2.0\db_1\jdbc\lib\classes12.jar"

This is in my class path and

I created 'oracle' as odbc in administrative tools.

I can't understand how to figerout problem.


Thanks

Vaishali
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic