Vishal
Vishal

Reputation: 121

getting Invalid byte tag in constant pool : 19

i am creating one webservice and getting error like

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

i am using tomcat 8.0 and java versoin is 1.8.0.152.

Upvotes: 4

Views: 17295

Answers (1)

Stephen C
Stephen C

Reputation: 719279

A constant pool entry with tag type 19 is a module descriptor; see JVM spec table 4.4-A. I think you have attempted to use BCEL on a class compiled with a Java 9 (or later) compiler:

  • The BCEL version you are using doesn't understand the tag.
  • The class wouldn't load in a Java 8 JVM anyway. Modules were only introduced in Java 9, and the class file's major version number should be too recent for a Java 8 JVM.

Upvotes: 16

Related Questions