Tag: classformatexception

org.apache.tomcat.util.bcel.classfile.ClassFormatException:常量池中的无效字节标记:15

我正在从Tomcat 7移植一个Web应用程序到另一个Tomcat 7,但与Java 8的服务器。 Tomcat成功启动,但在日志catalina.out我得到: org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15 at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:131) at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:60) at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209) at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2049) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1931) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1899) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1885) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1281) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:346) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:90) at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172) at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:899) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:875) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:618) at org.apache.catalina.startup.HostConfig.deployDirectory(HostConfig.java:1100) at org.apache.catalina.startup.HostConfig$DeployDirectory.run(HostConfig.java:1618) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) […]

org.apache.tomcat.util.bcel.classfile.ClassFormatException:常量池中的无效字节标记:15 – Tomcat 7,JDK不兼容?

我尝试升级到Java 8.当启动我们的tomcat7服务器,与Java 7编译的.war文件,我得到下面的神秘错误。 我应该期望这个工作吗? 这个职位说,tomcat 7应该与1.6和以上。 我不知道Tomcat是否应该归咎于.war。 切换出不同的Java版本: 安装了JDK 7.45 – works(用于编译.war的相同版本) JDK 7.55安装 – 失败如下 JDK 8.05安装 – 失败如下 是指责tomcat,还是.war? Caused by: org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15 at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:131) at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(ConstantPool.java:60) at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:209) at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:119) at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2032) at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1923) at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1891) at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1877) at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1270) at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:855) at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:345) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) […]