I have configured Junit 4 with Spring 3.2.8 where I have used JDK 8. Here is my test controller class
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = { WebConfig.class })
public class TManagerTest {
@Autowired
private TestManager testManager ;
@Test
public void test() {
this.testManager.getAll();
}
}`
When I try to run application I'm getting this error:
ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file ././TManagerTest .java
When I search issue I found Spring 3.x support upto JDK 7. So it has to compile with JDK 7 but we can use JRE 8.
Is it true ? If yes my question is when I create classes with annotated @Service, @Controller and run application it works fine. Why does the error occur with junit only? If it is the case then it should not work with other than junit too.
If i want to use spring 3.2.8 , with jdk 8 .
ASM. I wonder if you exclude and use a newer version of asm in your spring dependencies, would this work? - Eugene