- This topic has 4 replies, 3 voices, and was last updated 15 years, 4 months ago by support-eugene.
-
AuthorPosts
-
apcybsmyeMemberHello,
I’m trying to get a MyEclipse Maven project working. The project uses JDBC properties that need to be set as JRE System Properties. This is for connection to a MySQL database. The project is not intended to be run within an app-server.
I have followed the MyEclipse tutorial instructions and imported the MySQL jar file into the Maven repository and modified the POM.xml file accordingly;-
<dependency>
<groupId>mysql-connector-java</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>5.0.8</version>
</dependency>After compiling the project I’ve configured the system properties as VM arguments within a run configuration (i’m not sure if that was the right way to go about it);-
${-Ddatasource.Datasource.driver}
${-Ddatasource.Datasource.url}
${-Ddatasource.Datasource.user}
${-Ddatasource.Datasource.password}When running the target class, I get the error;-
java.lang.NoClassDefFoundError: com/mysql/jdbc/driver
After doing the above, I can’t figure why. Any ideas?
Thanks
A.P
support-shaliniMemberapcybsmye,
java.lang.NoClassDefFoundError: com/mysql/jdbc/driver
Can you verify if driver.class in present in the jar file you have used?
apcybsmyeMemberHi,
Yes, I have verified the Driver.class is present in the .jar under com.sql.jdbc.
A.P
apcybsmyeMemberI should mention that I’ve also noticed that when importing the .jar file as previously described, I get the following error message which I suspect is related;-
05/06/09 09:43:33 BST: Error on removing indexing context local; Cannot delete C:\Documents and Settings\*profilename*\workspace\.metadata\.plugins\org.maven.ide.eclipse\nexus\local\_3.fdt
05/06/09 09:43:46 BST: Unable to reindex local repository
support-eugeneMemberIs this a standalone Java application or a web project?
How do you “run” the application? -
AuthorPosts