8α参数编译器标记异常

8α参数编译器标记异常

本文介绍了Tomcat 7的注解扫描仪和JDK 8α参数编译器标记异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我编译我的类文件在JDK 8的α参数标志,preserves参数名称,使通过反射提供他们。 Tomcat 7的似乎有问题,与我的类文件。

I am compiling my classfiles with JDK 8 with the -parameters flag which preserves the parameter names and makes them available via reflection. Tomcat 7 seems to have issues with my class files.

Aug 13, 2014 8:31:32 AM org.apache.catalina.startup.ContextConfig processAnnotationsFile
SEVERE: Unable to process file [/home/rex/apache-tomcat-7.0.54/webapps/ROOT/WEB-INF/classes/mod/test/TestData.class] for annotations
java.io.EOFException
        at java.io.DataInputStream.readUnsignedShort(DataInputStream.java:340)
        at org.apache.tomcat.util.bcel.classfile.Utility.swallowMethodParameters(Utility.java:797)
        at org.apache.tomcat.util.bcel.classfile.Attribute.readAttribute(Attribute.java:171)
        at org.apache.tomcat.util.bcel.classfile.FieldOrMethod.<init>(FieldOrMethod.java:57)
        at org.apache.tomcat.util.bcel.classfile.Method.<init>(Method.java:71)
        at org.apache.tomcat.util.bcel.classfile.ClassParser.readMethods(ClassParser.java:267)
        at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:127)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2058)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2033)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2026)
        at org.apache.catalina.startup.ContextConfig.processAnnotationsFile(ContextConfig.java:2026)
        at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1291)
        at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:876)
        at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:374)
        at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)

我使用Tomcat 7.0.54和JDK 8u5 64
任何援助将大大AP preciated:)

I am using Tomcat 7.0.54 and JDK 8u5 x64Any assistance will be much appreciated :)

推荐答案

确认为固定的Tomcat 7.0.56

Confirmed to be fixed in Tomcat 7.0.56

请看changelog为Tomcat 7.0.56

See changelog for Tomcat 7.0.56 http://tomcat.apache.org/tomcat-7.0-doc/changelog.html

还测试了这款本地和它固定我的问题。

Also tested this locally and it fixed my problems

这篇关于Tomcat 7的注解扫描仪和JDK 8α参数编译器标记异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-06 14:07