java.io.IOException: invalid constant type: 19 at 5

前端 未结 1 1713
Happy的楠姐
Happy的楠姐 2021-01-05 06:05

I have a project. It uses spring boot 2, java 9 and maven. It can be build sucessfully using mvn clean package.

To run

1条回答
  •  执念已碎
    2021-01-05 06:18

    Though this doesn't answer on how to fix this but as stated in JDK-8161256 about the Constant pool tags:

    Java 9 uses codes 19 and 20 for the module system.

    and the way currently javassist creates ClassFile is by looking up in the ConstantPool (table until Java8) using the readOne method which certainly lacks something like a Module for the latest java version. Your dependency hierarchy for javassist:

    • org.springframework.boot:spring-boot-starter-actuator:jar:2.0.0.M3:compile

      • org.springframework.boot:spring-boot-starter-data-jpa:jar:2.0.0.M3:compile

        • org.hibernate:hibernate-core:jar:5.2.10.Final:compile

          • org.javassist:javassist:jar:3.21.0-GA:compile

    Looking at the javassist side of things:

    • There seems to be a similar bug registered on javassist/issues#147.

    • The rel_3_22_0_cr2 (last release) from them reads Compatible with Java 9-ea+164. Same issue occurs with this version of javassist as well.

    • So you can probably wait for javassist to come back over this with a solution.

    0 讨论(0)
提交回复
热议问题