probably due to a new Java class file version that isn‘t supported yet
probably due to a new Java class file version that isn’t supported yet1. 错误提示org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file[E:\Code\git\
probably due to a new Java class file version that isn’t supported yet
1. 错误提示
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file
[E:\Code\git\xxx.class]; nested exception is org.springframework.core.NestedIOException:
ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet:
file [E:\Code\git\xxx.class]; nested exception is java.lang.IllegalArgumentException
org.apache.catalina.core.StandardContext.listenerStart 异常将上下文初始化事件发送到类的侦听器实例.[org.springframework.web.context.ContextLoaderListener]
严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.listenerStop 例外情况发送上下文删除事件[org.springframework.web.context.ContextLoaderListener],以便列表实例
java.lang.IllegalStateException: BeanFactory not initialized or already closed - call 'refresh' before accessing beans via the ApplicationContext
2. Spring版本对应JDK版本
1.检查一下Spring版本和JDK 版本
Spring Framework 5.3.x: JDK 8-17 (expected)
Spring Framework 5.2.x: JDK 8-15 (expected)
Spring Framework 5.1.x: JDK 8-12
Spring Framework 5.0.x: JDK 8-10
Spring Framework 4.3.x: JDK 6-8
官网地址:
https://github.com/spring-projects/spring-framework/wiki/Spring-Framework-Versions
经过检查是JDK1.8 不兼容Spring Framework 3.2.x
3. IDEA修改项目JDK版本
1.7JDK下载地址: https://www.oracle.com/java/technologies/javase/javase7-archive-downloads.html#jdk-7u80-oth-JPR
选择JDK版本
替换Project JDK版本
修改Modules 语法级别
设置源文件路径, 编辑代码时会显示源文件形式
设置输出路径
设置JDK版本
4.Tomcat 对应JDK版本
参考链接https://blog.csdn.net/ThinkWon/article/details/102622738
开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!
更多推荐
所有评论(0)