org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 15 - Tomcat 7, JDK incompatibilty? [duplicate]

强颜欢笑 提交于 2019-11-26 21:00:20

I was seeing this error with Tomcat 7.0.26.

To answer your question, Tomcat is to blame: https://issues.apache.org/bugzilla/show_bug.cgi?id=53735

Upgrading to version 7.0.53 fixed it for me (according to the linked issue, the fix should be in 7.0.30 and later).

Jeet

I also faced this problem. I followed the error and I foud out I needed to upgrade to the latest version our maven dependency for ICU4J jar.

And the error is gone now:

  <dependency>
     <groupId>com.ibm.icu</groupId>
     <artifactId>icu4j</artifactId>
     <version>56.1</version>
  </dependency>

I had Java 8 on my computer, but I wanted to run my Tomcat using Java 7.

The following solution worked for me.

In %CATALINA_HOME%\bin\ (E.g.: C:\Tomcat\bin) add setenv.bat having the following content:

@echo off
set JAVA_HOME=C:\Program Files\Java\jdk1.7.0_03
set JRE_HOME=%JAVA_HOME%\jre
exit /B 0

When you run startup.bat, the following calls happen:

startup.bat
     |
     └── catalina.bat
               |
               └── setenv.bat
  • see:

    if not exist "%CATALINA_BASE%\bin\setenv.bat" goto checkSetenvHome
    call "%CATALINA_BASE%\bin\setenv.bat"
    
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!