Announcement Announcement Module
Collapse
No announcement yet.
Roo 1.2.1 and STS 2.9.1 - ClassNotFoundException on JUnit execution Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Roo 1.2.1 and STS 2.9.1 - ClassNotFoundException on JUnit execution

    Geetings,

    I'm getting a ClassNotFoundException when executing the Roo generated IntegrationTests as follows:
    1 - Within STS, create new Spring Roo project, using Roo v1.2.1
    2 - Within STS Roo Shell, setup persistence: persistence setup --database HYPERSONIC_PERSISTENT --provider HIBERNATE
    3 - Within STS Roo Shell, create entity: entity jpa --class com.test.model.MyEntity --testAutomatically
    4 - MyEntityIntegrationTest.java not seen as JUnit test, when right clicked on for run as.
    5 - Add src folder to Build Path as Source Folder- right click src folder/Build Path/Use as Source Folder
    6 - MyEntityIntegrationTest now seen as Junit, but get the below ClassNotFoundException upon executing:
    Class not found test.java.com.test.model.MyEntityIntegrationTest
    java.lang.ClassNotFoundException: test.java.com.test.model.MyEntityIntegrationTest
    at java.net.URLClassLoader$1.run(URLClassLoader.java: 202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 06)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 47)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.loadClass(RemoteTestRunner.java:693)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.loadClasses(RemoteTestRunner.java:429)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:452)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.runTests(RemoteTestRunner.java:683)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.run(RemoteTestRunner.java:390)
    at org.eclipse.jdt.internal.junit.runner.RemoteTestRu nner.main(RemoteTestRunner.java:197)

    Note: with Roo 1.1.5 this works fine, and I do not need to add the src folder to the build path. Also, if I right click on the project and run as/Maven Test, the JUnit is found and executes successfully.

    I'm guessing roo 2.1 is not configuring itself properly for Eclipse (STS). Is there a workaround available at this time?

    Thanks!
Working...
X