SpringJUnit4ClassRunner has thrown a NoSuchMethodError

java.lang.NoSuchMethodError
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod

Typical Exception Messages

  1. org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
  2. org/junit/runner/notification/RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
  3. org.junit.runner.notification.RunNotifier.testAborted(Lorg/unit/unner/escription;Ljava/ang/hrowable;)V
  4. org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
  5. org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/ runner/Description;Ljava/lang/Throwable;)V
  6. org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc ription;Ljava/lang/Throwable;)V

Specific cases

Solution

JaviRpo, 3 months ago

Each specific spring-test version use a specific (or range) junit version. This error occurs when the junit version is not compatible with the spring-test version.

You can take a look of your spring-test version in Maven Central to check which is the suggested junit version.

External results for this pattern (26)

  1. Unknown authorvia nabble.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Desc ription;Ljava/lang/Throwable;)V
    Show stack trace
  2. Unknown authorvia bozho.net5 months ago
    org/junit/runner/notification/RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  3. Unknown authorvia sjsjw.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  4. Unknown authorvia xuebuyuan.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  5. Unknown authorvia csdn.net5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  6. Unknown authorvia tuicool.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  7. Unknown authorvia cnblogs.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  8. Unknown authorvia baidu.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  9. Unknown authorvia wordpress.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace
  10. Unknown authorvia wordpress.com5 months ago
    org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V
    Show stack trace