Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Problem with connecting to mysql database using eclipse.

 
vijayakrishna Mikkilineni
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,

I am trying to connect to mysql database using eclipse. I already added MySQL JDBC Driver to the libraries folder in eclipse. Here is the code:




However when I start the Tomcat Server, I am getting ClassNotFoundException:





I ran the same code using NetBeans IDE and it is running perfectly. I am using this code for a Web Application. I have to use eclipse because this is a Adobe Flex based project.

Can someone help me with this?
 
vijin das
Ranch Hand
Posts: 129
Firefox Browser Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please specify whether you had added to WEB-INF/lib folder

is it there in the java build path ....(did you added it to there) just check this also eclipse tutorial

export the project as a war file and extract the contents of the war file if your exported library is there in WEB-INF/lib folder then it should work ........... try upload that war file into your server and see whether it is working properly....


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic