0

I am trying to run a test from XSDGeneratorTest.java. But I get the following exception:

Class not found com.level3.pcat.xsd.XSDGeneratorTest
java.lang.ClassNotFoundException: com.level3.pcat.xsd.XSDGeneratorTest
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:423)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:356)
at     org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClass(RemoteTestRunner.java:693)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.loadClasses(RemoteTestRunner.java:429)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:452)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)

I tried to claen and build the project many a times but still same error! I tried all the options from JUNIT Test class in Eclipse - java.lang.ClassNotFoundException, but none worked for me!

Community
  • 1
  • 1
One
  • 15
  • 2
  • 7
  • http://stackoverflow.com/questions/2639018/why-is-my-test-not-running – Jan Krakora Dec 17 '12 at 19:16
  • I resolved the issue by moving Maven Dependencies above JRE System Library and then executing mvn clean test. Somehow just moving Maven Dependencies above JRE System Library didnt work for me! – One Dec 17 '12 at 20:03
  • http://stackoverflow.com/questions/11381068/ – nhylated Nov 25 '14 at 05:53

1 Answers1

0

If that happens when you moved your project from one IDE/OS to another, just try to remove the JUnit3 library and add it again. Sometimes that fails when you bring your proyect from outside. I was stuck getting the same error until I did that.

Watchmaker
  • 4,908
  • 1
  • 37
  • 38