• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

java.sql.SQLException: No suitable driver

 
Ranch Hand
Posts: 107
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am trying to do simple jdbc program


can anybody help me to come out?

Thanks

Vaishali
 
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
please can you tell me which jar file is needed in classpath.

I am using oracle 10g.

Thanks

Vaishali
 
author & internet detective
Posts: 41905
909
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 "jdbc:odbc:oracle". 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
New rule: no elephants at the chess tournament. Tiny ads are still okay.
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic