File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Testing and the fly likes java.lang.NoClassDefFoundError: org.junit.runner.notification.RunListener (JUNIT4_4.3.1 Jar problem) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "java.lang.NoClassDefFoundError: org.junit.runner.notification.RunListener (JUNIT4_4.3.1 Jar problem)" Watch "java.lang.NoClassDefFoundError: org.junit.runner.notification.RunListener (JUNIT4_4.3.1 Jar problem)" New topic
Author

java.lang.NoClassDefFoundError: org.junit.runner.notification.RunListener (JUNIT4_4.3.1 Jar problem)

Laxmi Prasanna Bn
Greenhorn

Joined: Feb 13, 2012
Posts: 17
Hi Friends,

While ruuning the JUNIT test case from RAD-7.5 i got the following error message on console.
here i understood that the problem is in JUNIT jar file, i'm adde the
"JUNIT4_4.3.1" file in my web project, but still getting the following problem please hellp me on this.

Thanks.
java.lang.NoClassDefFoundError: org.junit.runner.notification.RunListener
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(J9VMInternals.java:72)
at java.lang.J9VMInternals.verify(J9VMInternals.java:70)
at java.lang.J9VMInternals.initialize(J9VMInternals.java:134)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(JUnit4TestLoader.java:40)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(JUnit4TestLoader.java:30)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:445)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ClassNotFoundException: org.junit.runner.notification.RunListener
at java.net.URLClassLoader.findClass(URLClassLoader.java:434)
at java.lang.ClassLoader.loadClass(ClassLoader.java:660)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:358)
at java.lang.ClassLoader.loadClass(ClassLoader.java:626)
... 10 more
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Are you using "run as > junit test" in RSA? Also, how did you add JUnit to your classpath? Maybe you can post a screenshot of that?


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Laxmi Prasanna Bn
Greenhorn

Joined: Feb 13, 2012
Posts: 17
Thanks

I had two versions of JUNIT Jar's in my class. i removed and finally reolved.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: java.lang.NoClassDefFoundError: org.junit.runner.notification.RunListener (JUNIT4_4.3.1 Jar problem)
 
Similar Threads
Problem in JUnit
Facing problem in Junit4 and spring 2.5 configuration
java.lang.NoClassDefFoundError: junit.framework.Test
URLClassLoader.java- Class not found Exception
Question about running Junit test's in eclipse.