Invalid byte tag in constant pool: 19 error message

前端 未结 4 1251
遥遥无期
遥遥无期 2020-12-11 04:22

This error message shows that the Tomcat is 8.0.30, and I am using JDK 8. I am creating a Spring-boot project. Some suggested that JDK 8 should be used but I indeed am using

相关标签:
4条回答
  • 2020-12-11 04:42

    Tomcat 8.0 has reached End of Life and should not be used!

    The replacement is Tomcat 8.5 (implementing the same specifications as Tomcat 8.0) or Tomcat 9.0 (newer versions of specifications). See "Migration Guide" at tomcat.apache.org.

    org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:97)

    The BCEL library here is used to parse class files when Tomcat scans for annotations. The version that you are using does not support some features in class file format of Java 8, and thus fails when trying to parse the file.

    Your options:

    1. Ignore.
    2. Upgrade Tomcat.
    3. Exclude those jars from annotation scanning. (See the official Tomcat FAQ → Performance → How do I make Tomcat start up faster?).
    0 讨论(0)
  • 2020-12-11 04:46

    You can try to downgrade the version of glassfish packages in your dependencies. Had the problem with 2.30.1 version (and Tomcat 8.5 Server), no more issue after changing to 2.22.2.

        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-client</artifactId>
            <version>2.22.2</version>
        </dependency>
        <dependency>
          <groupId>org.glassfish.jersey.media</groupId>
          <artifactId>jersey-media-json-jackson</artifactId>
          <version>2.22.2</version>
        </dependency>
    
    0 讨论(0)
  • 2020-12-11 04:53

    I also got same issue. I just changed aspectjrt and aspectjweaver jar version to

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjrt</artifactId>
            <version>1.8.5</version>
        </dependency>
    
        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>1.8.5</version>
        </dependency>
    

    Try this one might work for you also.

    0 讨论(0)
  • 2020-12-11 05:07

    In order to upgrade the tomcat version for the tomcat7-maven-plugin.

    <properties>
        <tomcat7-version>7.0.93</tomcat7-version>
    </properties>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.tomcat.maven</groupId>
                <artifactId>tomcat7-maven-plugin</artifactId>
                <version>2.2</version>
                <dependencies>
                    <dependency>
                        <groupId>org.apache.tomcat.embed</groupId>
                        <artifactId>tomcat-embed-core</artifactId>
                        <version>${tomcat7-version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
    
    0 讨论(0)
提交回复
热议问题