java.lang.NoClassDefFoundError: org/junit/runners/model/MultipleFailureException
general java 2015. 5. 31. 23:54spring 4.1 올리면서 테스트 코드 실행시 다음 에러가 발생한다.
java.lang.NoClassDefFoundError: org/junit/runners/model/MultipleFailureException
java.lang.NoClassDefFoundError: org/junit/runners/model/MultipleFailureException
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.withAfterClasses(SpringJUnit4ClassRunner.java:188)
at org.junit.runners.ParentRunner.classBlock(ParentRunner.java:145)
at org.junit.runners.ParentRunner.run(ParentRunner.java:235)
at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:163)
at org.junit.runners.Suite.runChild(Suite.java:128)
at org.junit.runners.Suite.runChild(Suite.java:24)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
at org.junit.runner.JUnitCore.run(JUnitCore.java:157)
at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:78)
at com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:212)
at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:68)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at com.intellij.rt.execution.application.AppMain.main(AppMain.java:140)
Caused by: java.lang.ClassNotFoundException: org.junit.runners.model.MultipleFailureException
해결은 pom.xml에 최신버전의 4.9이상의 junit 버전을 추가하면 된다. 나는 최신버전의 4.12로 수정했더니 동작이 잘된다.
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
'general java' 카테고리의 다른 글
[spring] 3.2 에서 4.1 migration시 org.springframework.mail.javamail.JavaMailSenderImpl cannot be resolved (0) | 2015.06.03 |
---|---|
spring cglib default 생성자 (0) | 2015.06.03 |
[Spring Boot] Actuator 예제 (0) | 2015.05.27 |
STS(spring tool suite)에서 spring boot 애플리케이션 지원 (0) | 2015.05.27 |
[gradle] maven repository에서 pom /jar 못 읽어 올 때, (0) | 2015.05.22 |