facebook

JRE System Properties

  1. MyEclipse Archived
  2.  > 
  3. Database Tools (DB Explorer, Hibernate, etc.)
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #299068 Reply

    apcybsmye
    Member

    Hello,

    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

    #299081 Reply

    apcybsmye,

    java.lang.NoClassDefFoundError: com/mysql/jdbc/driver

    Can you verify if driver.class in present in the jar file you have used?

    #299085 Reply

    apcybsmye
    Member

    Hi,

    Yes, I have verified the Driver.class is present in the .jar under com.sql.jdbc.

    A.P

    #299087 Reply

    apcybsmye
    Member

    I 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

    #299151 Reply

    Is this a standalone Java application or a web project?
    How do you “run” the application?

Viewing 5 posts - 1 through 5 (of 5 total)
Reply To: JRE System Properties

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