我正在使用带有-parameters标志的JDK 8编译我的类文件,该标志保留了参数名称并通过反射使其可用。Tomcat 7似乎与我的类文件有关。
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 x64,将不胜感激任何帮助:)
确认已在Tomcat 7.0.56中修复
请参阅Tomcat 7.0.56的变更日志http://tomcat.apache.org/tomcat-7.0-doc/changelog.html
在本地也测试过,它解决了我的问题