Issue
I've a Java EE maven project on a computer which works fine, I've import the project on another computer but when I launch a page I have the following error:
java.lang.NoClassDefFoundError: com/mysql/jdbc/Driver
The mysql-connector is installed via maven:
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.1.30</version>
</dependency>
I don't know what to do. Thanks for your help.
Solution
Is the path where maven is downloading these jars for you added to your classpath? You can add the jar file downloaded by Maven to your eclipse project by selecting the project in eclipse, right click it and go down to properties, select the Java Build Path>>select the Libraries Tab>>Add external jar file and browse for the installed mysql-connector-java.jar file
Answered By - Sarang Kane
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.