tomcat 8 支持 jdk1.8 么 运行会报下面的错误

发布于 2022-09-01 11:54:45 字数 1045 浏览 12 评论 0

caused by: 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 [/Users/eleme/Documents/ele.me/workspace/.metadata/.plugins/org.eclipse.wst.server.core/tmp1/wtpwebapps/coffee-eve-svr/WEB-INF/classes/me/ele/coffee/eve/webapi/base/AuthController.class]; nested exception is java.lang.IllegalArgumentException
    at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:56)
    at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
    at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
    at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:257)

求大家帮忙看看 是不是由于tomcat8不支持jdk1.8的问题啊 谢谢 大家

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

救赎№ 2022-09-08 11:54:45

你应该用的是spring3吧,spring3跟jdk8有asm冲突,建议升级spring4或者使用jdk7就可以了

我乃一代侩神 2022-09-08 11:54:45

从异常来看应该是Spring加载Bean过程中,ASM处理类文件出现问题,应该不是Tomcat的问题。

下面从Stackover直接抄过来的。

As @prunge and @Pablo Lozano stated, you need Spring 4 if you want compile code to Java 8 (--target 1.8), but you can still run apps on Java 8 compiled to Java 7 if you run on Spring 3.2.X.

Check out http://docs.spring.io/spring/docs/current/spring-framework-reference/h...

Stackover链接:

http://stackoverflow.com/questions/22526695/java-1-8-asm-classreader-f...

花开柳相依 2022-09-08 11:54:45

tomcat8和jdk没冲突,应该是你使用的其他包对jdk1.8的支持不够。同楼上的,建议先使用jdk1.7

瘫痪情歌 2022-09-08 11:54:45

lz 我也遇到同样的情况了,我是在Mac上的jdk1.8,也是报asm 的一个什么包错误,但是在windows上面的代码一样完全是可以的,不知道lz现在解决没?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文