java.lang.NoClassDefFoundError: org/junit/rules/TestRule

MuleSoft JIRA | Pablo Kraan | 5 years ago
  1. 0

    Unable to run the test on an project created using the transport archetype. Getting this failure: java.lang.NoClassDefFoundError: org/junit/rules/TestRule at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getMethod0(Class.java:2670) at java.lang.Class.getMethod(Class.java:1603) at org.junit.internal.builders.SuiteMethodBuilder.hasSuiteMethod(SuiteMethodBuilder.java:20) at org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:13) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24) at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45) at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209) at org.apache.maven.surefire.Surefire.run(Surefire.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: java.lang.ClassNotFoundException: org.junit.rules.TestRule at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 21 more Steps to reproduce: _Create a project using the transport archetype. _ Run mvn test _ Check the surefire log to see the exception stack trace

    MuleSoft JIRA | 5 years ago | Pablo Kraan
    java.lang.NoClassDefFoundError: org/junit/rules/TestRule
  2. 0

    Unable to run the test on an project created using the transport archetype. Getting this failure: java.lang.NoClassDefFoundError: org/junit/rules/TestRule at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2427) at java.lang.Class.getMethod0(Class.java:2670) at java.lang.Class.getMethod(Class.java:1603) at org.junit.internal.builders.SuiteMethodBuilder.hasSuiteMethod(SuiteMethodBuilder.java:20) at org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:13) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29) at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57) at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24) at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45) at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56) at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96) at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209) at org.apache.maven.surefire.Surefire.run(Surefire.java:156) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345) at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009) Caused by: java.lang.ClassNotFoundException: org.junit.rules.TestRule at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 21 more Steps to reproduce: _Create a project using the transport archetype. _ Run mvn test _ Check the surefire log to see the exception stack trace

    MuleSoft JIRA | 5 years ago | Pablo Kraan
    java.lang.NoClassDefFoundError: org/junit/rules/TestRule
  3. 0

    Geovise BVBA

    hibernatespatial.org | 12 months ago
    java.lang.NoClassDefFoundError: org.hibernatespatial.testsuite.SpatialFunctionalTestCase
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Geovise BVBA

    hibernatespatial.org | 12 months ago
    java.lang.NoClassDefFoundError: org.hibernatespatial.testsuite.SpatialFunctionalTestCase
  6. 0

    java.lang.NoClassDefFoundError: How to resolve – Part 2 ~ Java EE Support Patterns

    blogspot.com | 1 month ago
    java.lang.NoClassDefFoundError: org/openqa/selenium/WebDriver

  1. davidvanlaatum 14 times, last 6 months ago
  2. Luka 4 times, last 2 months ago
29 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.ClassNotFoundException

    org.junit.rules.TestRule

    at java.net.URLClassLoader$1.run()
  2. Java RT
    Class.getMethod
    1. java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    2. java.security.AccessController.doPrivileged(Native Method)
    3. java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    4. java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    5. sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    6. java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    7. java.lang.Class.getDeclaredMethods0(Native Method)
    8. java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    9. java.lang.Class.getMethod0(Class.java:2670)
    10. java.lang.Class.getMethod(Class.java:1603)
    10 frames
  3. JUnit
    ClassRequest.getRunner
    1. org.junit.internal.builders.SuiteMethodBuilder.hasSuiteMethod(SuiteMethodBuilder.java:20)
    2. org.junit.internal.builders.SuiteMethodBuilder.runnerForClass(SuiteMethodBuilder.java:13)
    3. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    4. org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
    5. org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
    6. org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
    6 frames
  4. JUnit4 Provider
    JUnit4DirectoryTestSuite.createTestSet
    1. org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
    2. org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
    2 frames
  5. SureFire
    Surefire.run
    1. org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
    2. org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
    3. org.apache.maven.surefire.Surefire.run(Surefire.java:156)
    3 frames
  6. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:597)
    4 frames
  7. SureFire
    SurefireBooter.main
    1. org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
    2. org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
    2 frames