|
#1
|
|||
|
|||
|
Basically, Junit 4.5 took out exceptions out the constructor classes. So I am running spring2.5.5 under it will get:
java.lang.NoClassDefFoundError: org/junit/Assume$AssumptionViolatedException at org.springframework.test.context.junit4.SpringMeth odRoadie.runTestMethod(SpringMethodRoad ie.java:240)
__________________
Thanks, jfd |
|
#2
|
|||
|
|||
|
hello,
found similar problems but looked like my test assertions was incorrect could you please post : - your code - your test cocde - your pom.xml if you are using Maven to build your project i dont know your whole situation.. could you run your tests using JUnit 4.4 and see results? i found some posts somewhere that Spring sources were compiled using JUnit4.4 and JUnit guys changed signatures of certain methods regards marco |
|
#3
|
|||
|
|||
|
The spring folks built there SpringJUnit4ClassRunner to extend an internal class. The internal class changed in junit 4.5. They need to be extending BlockJUnit4ClassRunner.
|
|
#4
|
|||
|
|||
|
see: htxp://thorndike.javaeye.com/blog/263197
(sorry can't post URLs yet, change "htxp to http") what i took from this is to bump my junit support down to 4.4. although it appears that maybe upgrading to Spring 2.5.6 will alleviate this problem. Thanks for leading along the right track, Adamal! |
|
#5
|
|||
|
|||
|
I'm not sure if this is related but in the following code
Code:
@RunWith(SpringJUnit4ClassRunner.class)
public class GenericRequestControllerTests {
@Test
public void testLogout() {
.....
}
}
Code:
java.lang.NoSuchMethodError: org.junit.runner.notification.RunNotifier.testAborted(Lorg/junit/runner/Description;Ljava/lang/Throwable;)V at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.invokeTestMethod(SpringJUnit4ClassRunner.java:137) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:59) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:52) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:34) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:44) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:50) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:45) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) 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) |
|
#6
|
|||
|
|||
|
I was getting the same error with Spring 2.5.6 and Junit 4.5.
When I downgraded to JUnit 4.4, the exception went away. |
|
#7
|
|||
|
|||
|
Thanks for the tip - I was seeing this error and downgraded to junit 4.4 which fixed it too.
|
|
#8
|
|||
|
|||
|
Quote:
|
|
#9
|
|||
|
|||
|
Hi guys,
FYI: as of Spring 3.0 M3, the Spring TestContext Framework is now based on JUnit 4.5. - Sam
__________________
Sam Brannen, Software Consultant Spring Framework Core Developer Follow me on Twitter
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|