aspose 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 Java 8 in Action this week in the Java 8 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

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

Laxmi Prasanna Bn

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.

java.lang.NoClassDefFoundError: org.junit.runner.notification.RunListener
at java.lang.J9VMInternals.verifyImpl(Native Method)
at java.lang.J9VMInternals.verify(
at java.lang.J9VMInternals.verify(
at java.lang.J9VMInternals.initialize(
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.createTest(
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestLoader.loadTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(
Caused by: java.lang.ClassNotFoundException: org.junit.runner.notification.RunListener
at java.lang.ClassLoader.loadClass(
at sun.misc.Launcher$AppClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(
... 10 more
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 29274

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

Joined: Feb 13, 2012
Posts: 17

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