This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes No suitable driver java.sql.SQLException: No suitable driver Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "No suitable driver java.sql.SQLException: No suitable driver " Watch "No suitable driver java.sql.SQLException: No suitable driver " New topic
Author

No suitable driver java.sql.SQLException: No suitable driver

Kaverappa Prabhakar
Ranch Hand

Joined: Aug 18, 2009
Posts: 43
I have a J2EE application running in the Oracle JDeveloper IDE. I did not have any problem in creating JDBC connection in Oracle JDeveloper.

I migrated the application from JDeveloper to Eclipse version Build id: 20090621-0832. When I created the project in Eclipse IDE, the Import wizard as described below appeared.

The following is the prompt from the Import wizard:


I tried selecting Ojdbc.jar one time and without selecting it another time. When I ran the project on embeded server within the Eclipse, I get the Error both times:

One other note is that the ojdbc14 does appear in the Launch configiration properties associated with the project.

Please let me how to get arround this error in Eclipse IDE.

Thanks,
Prabhakar

Subin Sugunan
Greenhorn

Joined: Jul 01, 2009
Posts: 14
Make sure you have the driver jar in WEB-INF/lib directory.


Thanks and Best Regards
Subin Sugunan
Kaverappa Prabhakar
Ranch Hand

Joined: Aug 18, 2009
Posts: 43
Subin,

Thanks for the quick reply. It is in the WEB-INF/lib directory.

Prabhakar
Sandeep Sanaboyina
Ranch Hand

Joined: Dec 14, 2009
Posts: 72
Did you check if there are other jars with Drivers (like classes12.jar, ojdbc14dms.jar etc) in your launch configuration or WEB-INF/lib.

Some times having extra jars will create a problem.


They say you have to be the first, the best or different. I say, is it too much to ask for all three.
Kaverappa Prabhakar
Ranch Hand

Joined: Aug 18, 2009
Posts: 43
Sandeep,

I do not have any other jar files but I do have directory calcsLib in the web-info/bin along with jdbc4.jar. Under the calcsLib I have two classes: DateCalcs and UtilCalcs.

I do not think the presence of these two classes would cause problems.

Prabhakar
Sandeep Sanaboyina
Ranch Hand

Joined: Dec 14, 2009
Posts: 72
Sandeep Sanaboyina wrote:Some times having extra jars will create a problem.

I did not exactly mean any other jars.. I meant other driver jars. But as you say, you don't have any other jars.

I did encounter similar kind of issues with ojdbc.jar when I tried a project developed in JDev in Tomcat. It used to run fine in JDev but once deployed in Tomcat, it wouldn't run properly. But the same code worked fine in Oracle AS. Of course that would be because they were both esentially the same servers and included the driver jars in the server's lib. This was usually resolved by keeping the jar in WEB-INF/lib in the deployed code in Tomcat.

The only thing I can suggest now is make sure this jar is actually there in the deployed code in whatever server you are using and check that there are no conflicting jars in the lib of the server.
Kaverappa Prabhakar
Ranch Hand

Joined: Aug 18, 2009
Posts: 43
Sandeep,

I don't have any other driver jar within the Elcipse environment and in its workbench directory in the C directory on my PC.

I just want to let you know that Eclipse IDE has a embedded Tomcat just like Oracle Jdeveloper has a embedded OC4J server within the Oracle Jdeveloper IDE. When I build and run a java/J2EE application it runs on this embedded server and that is when "No suitable driver found" occurs. The WAR file created from JDeveloper runs when deployed on external Tomcat running on Windows or VMS. But it does not run on Tomcat server embedded within Eclipse after importing it as WAR file into the Eclipse IDE.

It looks like Java Ranch is unable to help me out on this issue. I've pretty much given up on this problem and look for alternative way to get arround this problem.

This Eclipse is giving me numerous problems. In my previous New topic posting on a different topc - IWAE0035E The Main-Class attribute must be defined in the application client module - I indicated my opinion that Oracle is a much better tool than Eclipse with respect to not being user friendly and too many number of bugs/problems. David Newton of Java Ranch responded saying "Not Really" I respectfully disagree with his views.

Thanks for you time and efforts.

Prabhakar










 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: No suitable driver java.sql.SQLException: No suitable driver
 
Similar Threads
mysql JDBC driver classpath problem.
java.lang.ClassCastException error
Prolems connecting to the Oracle database
jdbc connection to ms sql (urgent)
Websphere studio Can't find the jdbc driver!