ASM ClassReader failed to parse class file

半城伤御伤魂 提交于 2020-02-13 01:01:43

前言

维护很久以前的项目时,出现这个问题:ASM ClassReader failed to parse class file

分析

经过网上搜索该问题,发现是spring版本引起的。

Note that the Java 8 bytecode level (-target 1.8, as required by -source 1.8) is only fully supported as of Spring Framework 4.0. In particular, Spring 3.2 based applications need to be compiled with a maximum of Java 7 as the target, even if they happen to be deployed onto a Java 8 runtime. Please upgrade to Spring 4 for Java 8 based applications.

出问题的项目中使用的 spring 版本为3.2.8,jdk使用了java8。

解决办法

该问题的解决办法方案有两条:
a. 使用jdk7
b. 升级spring 4

参考

https://blog.csdn.net/blueheart20/article/details/50150529
https://stackoverflow.com/questions/22526695/java-1-8-asm-classreader-failed-to-parse-class-file-probably-due-to-a-new-java
https://stackoverflow.com/questions/36820068/asm-classreader-failed-to-parse-class-file-probably-due-to-a-new-java-class-fi

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!