• 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
  • Tim Cooke
  • Ron McLeod
  • paul wheaton
  • Jeanne Boyarsky
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
  • Himai Minh
Bartenders:

Error : class not found exception : com.mysql.jdbc.driver in eclipse Tool

 
Ranch Hand
Posts: 151
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi

I have impoted project file in eclipse in new machine using option import from existing workbence . When i stat to debug this project ,
i am getting error as class not found exception : com.mysql.jdbc.driver . my project folder already consist of mysql .jar file in /web appls/web-inf folder.
Application is running successfully in other machine from where i took the application file. As this error appeared I also added jar file into project path as Project ---->properties-- build java path---libraries----add external jar file.
kindly hep me.

Haresh
 
author
Posts: 5856
7
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You might have better luck with this question in the IDEs forum because Eclipse sometimes does strange things when deploying web applications. I'll move it for you.

By the way, the JDBC JAR file should be in WEB-INF/lib (though that sometimes depends on the app server you are using, you should let us know which app server you have).
 
Author
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please make sure to capitalize things properly, like WEB-INF and Driver, as these things are different, and significant.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This reply is wrt the error: class not found exception : com.mysql.jdbc.driver in eclipse Tool in a Dynamic Web App.( Tomcat Server)

I faced the same and figured that apart from adding the mysqlconnector jar to the class buildpath(Project->Properties->Java Build Path->Add External Jar), you need to copy paste the jar in the WEBINF folder of your project as well.
Ideally, restart IDE after this.

Hope this helped.

Arati Patro, Bangalore
 
Bartender
Posts: 11497
19
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch.

I take it you are using Eclipse.

I faced the same and figured that apart from adding the mysqlconnector jar to the class buildpath(Project->Properties->Java Build Path->Add External Jar), you need to copy paste the jar in the WEBINF folder of your project as well. Ideally, restart IDE after this.


Not really. As Peter mentioned, it should be under WEB-INF/lib. Once you put it there, its an "internal" jar! No restart required.

..wrt..


Please UseRealWords
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic