• 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

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

 
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Make sure you have the driver jar in WEB-INF/lib directory.
 
Kaverappa Prabhakar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Subin,

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

Prabhakar
 
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Kaverappa Prabhakar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 74
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 43
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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










 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic