org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18

简介: org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18

     jdk为1.8.0_45,tomcat 7.0.14。tomcat启动报错:org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18

<span style="font-size:18px;">org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 18
  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:1930)
  at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(ContextConfig.java:1826)
  at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(ContextConfig.java:1785)
  at org.apache.catalina.startup.ContextConfig.processAnnotations(ContextConfig.java:1771)
  at org.apache.catalina.startup.ContextConfig.webConfig(ContextConfig.java:1254)
  at org.apache.catalina.startup.ContextConfig.configureStart(ContextConfig.java:881)
  at org.apache.catalina.startup.ContextConfig.lifecycleEvent(ContextConfig.java:316)
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
  at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
  at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5103)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:812)
  at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:787)
  at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:607)
  at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:932)
  at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:723)
  at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:470)
  at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1322)
  at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
  at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
  at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:89)
  at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:379)
  at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:324)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1041)
  at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:774)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1033)
  at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:291)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:727)
  at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:145)
  at org.apache.catalina.startup.Catalina.start(Catalina.java:620)
  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  at java.lang.reflect.Method.invoke(Method.java:497)
  at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:303)
  at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:431)
</span>


解决办法:

      更换tomcat为8.5.20,就OK了。

      但是为啥tomcat7.0就不行呢。网上找办法,果真有:

   {tomcat路径}/conf/web.xml 修改方法:

   <web-app version="3.0" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" metadata-complete="true">

       metadata-complete="true" 这句话的意思是设置tomcat启动后不要自动扫描注解和网络碎片。

总结:

       好记性不如烂笔头。


参考文章:

   http://blog.csdn.net/dandandeshangni/article/details/50427322


相关文章
|
6月前
|
Java 应用服务中间件
程序启动时报: Invalid byte tag in constant pool: 19
程序启动时报: Invalid byte tag in constant pool: 19
379 0
|
4月前
|
编解码 程序员 开发者
【Python】已解决:UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xa1 in position 0: invalid start by
【Python】已解决:UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xa1 in position 0: invalid start by
3049 0
|
5月前
|
XML Java 数据库连接
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):XXXXX
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found):XXXXX
|
4月前
|
Java 数据库连接 mybatis
Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid
Request processing failed; nested exception is org.apache.ibatis.binding.BindingException: Invalid
|
6月前
|
XML Java 数据库连接
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.forum.d
org.apache.ibatis.binding.BindingException: Invalid bound statement (not found): com.example.forum.d
62 1
|
编解码 Python
pandas - read_csv报错:‘utf-8‘/‘gbk‘ codec can‘t decode byte 0xb1 in position 0:invalid start byte
pandas - read_csv报错:‘utf-8‘/‘gbk‘ codec can‘t decode byte 0xb1 in position 0:invalid start byte
368 0
|
6月前
|
Java 应用服务中间件
完美解决tomcat启动异常:Invalid byte tag in constant pool: 19;Unable to process Jar entry [module-info.class]
完美解决tomcat启动异常:Invalid byte tag in constant pool: 19;Unable to process Jar entry [module-info.class]
1252 0
|
11月前
|
编解码 Python
pandas读取csv错误UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 0: invalid start byte
pandas读取csv错误UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 0: invalid start byte
607 0
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
org.apache.ibatis.builder.BuilderException: An invalid property ‘jdbcType ‘ was found in mapping
|
XML Java 数据库连接
【异常解决】解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
【异常解决】解决org.apache.ibatis.binding.BindingException: Invalid bound statement (not found)问题
220 0

推荐镜像

更多