Issue
I am trying to compile the project. And I got this error.
java: cannot access org.springframework.context.support.ClassPathXmlApplicationContext
bad class file: /C:/Users/TechLine/.m2/repository/org/springframework/spring-context/6.0.0/spring-context-6.0.0.jar!/org/springframework/context/support/ClassPathXmlApplicationContext.class
class file has wrong version 61.0, should be 55.0
Please remove or make sure it appears in the correct subdirectory of the classpath.
How to solve it???
p.s I already was trying to change java version in java file on java core version(jdk)
Solution
I think your java version dosen't match spring version.
In your error message, you use spring framework 6 but you use java 11.
Spring framework 6 must use java 17 or higher in Spring 6 document.
https://springframework.guru/getting-ready-for-spring-framework-6/
So If you success compile, you need to use spring framework 5 or upgrade your java version to 17 or higher.
Answered By - changuk
Answer Checked By - Clifford M. (JavaFixing Volunteer)