This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Servlets and the fly likes No suitable driver problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "No suitable driver problem" Watch "No suitable driver problem" New topic
Author

No suitable driver problem

seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
Hi, This is my first servlet program. I wanted to try to
connect to oracle database. I have tomcat5.5.9 , JDK1.4,
oracle9i installed. I have copied the ojdbc14.jar file in
the common/lib folder. But I get the error as
SQLException: No suitable driver SQLState: 08001 VendorError: 0
I'm not sure why this occurs. I have learnt that ojdbc14
has the appropriate oracle driver. Please help.
The servlet code is as follows

David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459



Acording to this, if the driver fails to load, the exception will be reported but the code will continue to run. One problem may be failing to load the Class which then reports 'not suitable driver' when you go looking for it.
seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
Hi David O'Meara,
Thanks for the reply. But, that part of the code is executed, since I get the "Class found" statement on the browser.
seema prakash
Ranch Hand

Joined: Nov 17, 2004
Posts: 59
I got it working. It was the problem with the double quotes for url ...
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Oh of course
Nice catch, thanks for reporting back.

Dave
 
jQuery in Action, 2nd edition
 
subject: No suitable driver problem