facebook

java.lang.ClassNotFoundException Error

  1. MyEclipse IDE
  2.  > 
  3. Off Topic
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #259068 Reply

    Ghazalawahid
    Member

    I am trying to insert a row in a MySql table in a web based project.The code is working fine in a Java project (row is being inserted) but when i ‘am trying it in a web based project its not finding the JDBC driver and giving error :

    ” java.lang.ClassNotFoundException: No ClassLoaders found for: com.mysql.jdbc.Driver”

    I am adding the driver in project by adding external jar file in Web-inf/lib folder but its showing the driver in project’s root directory,not in web-inf/lib directory.Whats the exact problem,driver is not copied in right directory or something else?

    #259121 Reply

    Riyad Kalla
    Member

    I depends on how you are creating the connection to your database, are you using an JNDI datasource (container managed) or are creating it yourself using a DriverManager in the web application?

    Try dropping the connector-J JDBC driver in your Tomcat/common/lib directory and see if that helps… weird though, I’ve not see the “No ClassLoaders found…” error before… spceifically the classloader part.

Viewing 2 posts - 1 through 2 (of 2 total)
Reply To: java.lang.ClassNotFoundException Error

You must be logged in to post in the forum log in