• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

Can't find JDBC driver for project in MyEclipse

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm working on a Mac Pro, 2 Quad Core Processors, 10GB memory, 300GB Disk, OSX 10.5.4

When I try to get a connection to a local MySQL database in a web app, I get the error "No suitable driver."

1. I put the mysql-connector-java-5.1.6-bin.jar in my /lib/ext/ directory
2. I have configured the Java Build Path for the project and added external jar mysql-connector-java-5.1.6-bin.jar.
3. I tried putting the mysql-connector-java-5.1.6-bin.jar in the /Library/Java/Extensions folder.
4. I put the mysql-connector-java-5.1.6-bin.jar in the Tomcat/lib/ folder
5. I've tried adding the jar to the "Paths" setting in MyEclipse under Tomcat Server.

It seems like I've put the var everywhere I can possibly think of, but it still can't seem to find it.

Any ideas?
 
Ranch Hand
Posts: 83
Spring Tomcat Server Java
  • Likes 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How are you loading the driver? is it through a datasource code or you are using Clas.forName()?

Have you tried putting the mysql-connector-java-5.1.6-bin.jar file in <webappdir>/WEB-INF/lib

ideally it should be picked up by tomcat from this location.

Also just check following
1. if the jar is not corrupted.
2. If there are many jars in your web app then try to make sure driver jar comes first in the classpath....
 
When I was younger I felt like a man trapped inside a woman’s body. Then I was born. My twin is a tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic