This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread 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 Murach's Java Servlets and JSP this week in the Servlets 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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No suitable driver problem
 
Similar Threads
Null Pointer Exception
Data source name not found
SQLException: No suitable driver found for jdbc:mysql://localhost:3306/ SQLState: 08001 VendorError:
this code not compiling! why?
jdbc driver?