java ASM ClassReader无法解析类文件

dsekswqp  于 2023-02-14  发布在  Java
关注(0)|答案(1)|浏览(158)

我的spring应用程序在本地系统中使用java 1.8编译,运行良好,没有任何问题,但是当我在配置java-11的服务器上部署应用程序时,在服务器启动时出现错误消息

Caused by: org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: 
Failed to read candidate component class: URL
[jar:file:/app/apache-tomcat-9.0.46/webapps/planDeTravail/WEB-INF/lib/rna-1.20.jar!/com/DoRnaHistory.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: class path resource [java/io/Serializable.class]; 
 nested exception is java.lang.IllegalArgumentException
Offending resource: class path resource [META-INF/spring/rna-spring-context.xml]; 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: class path resource [java/io/Serializable.class]; 
 nested exception is java.lang.IllegalArgumentException
 at org.springframework.beans.factory.parsing.FailFastProblemReporter.error(FailFastProblemReporter.java:68

我的Spring应用程序在3.2.16.RELEASE中运行,有人能帮我找到问题的根本原因和解决方案吗?

nbewdwxp

nbewdwxp1#

我在Intellij中使用<org.springframework.version>5.2.0.RELEASE</org.springframework.version>时将JRE版本改回了8,我还将应用程序配置更改为使用JRE 8运行。

相关问题