当前位置: 代码迷 >> 综合 >> Spring:异常提示ASM ClassReader failed to parse class file***Java class file version that isn‘t supported
  详细解决方案

Spring:异常提示ASM ClassReader failed to parse class file***Java class file version that isn‘t supported

热度:56   发布时间:2023-12-08 18:03:58.0

问题

Springmvc 编译运行时出现如下异常

Caused by: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to read candidate component class: file [D:\***.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 ...

这个一般是升级了jdk版本后,导致低版本的springframework框架有些类不被jdk支持。如jdk1.6改成1.8后,spring 3x有些类会报错。

解决方案

在pom.xml中将springframework 3.x升级为5.x,问题解决。