• 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
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

JDBC:No Suitable Driver Found

 
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I am not sure but maybe a similar looking topic might have been posted earlier, in which case i would appreciate if you can post link..

Anyway, i'll describe my problem. I have been trying to write some application source (coding after a long time) and i was getting sql errors, ora-12505, listener does not know of the SID.
I found that probably it had something to do with the Oracle installation and found that changing the jdbc url to the entire string contained in tnsnames.ora file might do the trick.
Well at least i am now getting a different error and that is the NO suitable driver found. I have been trying to resolve it did hundreds of things, but mayb missing something here. To check i just create a simple java class that does nothing except for to get the connection to the DB. I changed and tried with all of the oracle jdbc drivers, classes12.jar, odbc14.jar but have not been able to do away with the error..Please suggest something that i can do to fix this. I tried for two days to hundreds of things so i am already a little out of time, would appreciate if you can post urgently..Thanks a lot in advance..
Am
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The driver class is not on the class path of the server. Maybe copying jar to one of the lib folders of server would do the trick.
 
amol bakre
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

O i tried several option with that too, i am using tomcat for development right now but will be porting it later to weblogic., anyway, i have built the application archive with the driver jar in the lib folder, i kept the driver in server/lib, common/lib everywhere, tried keeping it everywhere too. i changed to source to specifically import the OracleDriver class into the source and register the driver by doing new DriverManager(), and that succeeds!! but when i try to get the connection it gives me this error..
And now i am just trying to find what is going wrong by making one simple standalone class with jar in the folder and executing it and still getting the same error, so i am guessing probably the error is not the classpath, maybe the URL!!, but i tried with the conventional URL, jdbc:oracle..etc and i get an error saying Listener could not find the SID, and if i use the entire string in the tnsnames.ora file, as maybe the oracle installation might be running RAC etc..
I dont know if there is anything else that might cause this problem..
 
amol bakre
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
O, by the way, thanks for replying and so fast..
 
Aurelian Tutuianu
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
could you post the whole url here? I mean no real data, just to verify syntax?
 
amol bakre
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

When i use this::
jdbc:oracle:thin:@10.40.51.41:1531:x.y.z.a
ORA-12505, TNS:listener does not currently know of SID given in connect descriptor

and when i use this::
(DESCRIPTION =(ADDRESS_LIST =(ADDRESS = (PROTOCOL = TCP)(HOST = 1.1.1.1)(PORT = 1531)(CONNECT_DATA =(SERVICE_NAME = x.y.z.a)))

then it results into a No Suitable driver found..

Let me know if you find something..thank you..
 
amol bakre
Greenhorn
Posts: 29
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I solved my problem, i played with the url, intentionally malformed it and then i got a message from the compiler and the valid / expected format..lol..
the format it said that should be used is : "//host:port/service_name"

is a little different, maybe something changed 1.4 onwards,..will find out..

 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic