开发者社区> 问答> 正文

tomcat 8 在使用 jdk1.8 时 运行会报下面的错误

已解决

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)

展开
收起
小旋风柴进 2016-03-04 10:14:06 2663 0
1 条回答
写回答
取消 提交回答
  • 表格存储(TableStore)技术负责人,专注结构化数据存储领域技术和解决方案。
    采纳回答

    网上有对这个问题的解释:
    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.

    两种方案:

    1. 使用JDK 7
    2. 升级到Spring 4
    2019-07-17 18:51:52
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
Apache Tomcat 的云原生演进 立即下载
低代码开发师(初级)实战教程 立即下载
阿里巴巴DevOps 最佳实践手册 立即下载