Deploying Aspose.Words JAR in Tomcat | Apache Commons BCEL | Invalid Byte Tag in Constant Pool: 15

We are getting the below error while deploying the aspose jar in tomcat. Can you advice us how to resolve this?

SEVERE: Unable to process Jar entry [META-INF/versions/9/module-info.class] from Jar [file:/C:/Temp/Tomcat/wtpwebapps/DDARest/WEB-INF/lib/aspose-words-20.9.0-jdk17.jar] for annotations
org.apache.tomcat.util.bcel.classfile.ClassFormatException: Invalid byte tag in constant pool: 19
at org.apache.tomcat.util.bcel.classfile.Constant.readConstant(Constant.java:97)
at org.apache.tomcat.util.bcel.classfile.ConstantPool.(ConstantPool.java:55)
at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(ClassParser.java:176)
at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(ClassParser.java:85)
at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(ContextConfig.java:2042)

@shakila.banu,

This does not seem to be an issue in Aspose.Words for Java. Apache Commons BCEL (byte code engineering library) is used by Tomcat to scan annotations. The old Commons BCEL version did not know how to read the module-info.class file.

Please check Tomcat’s change history and the fix 60688.

Commons BCEL has been updated to support this on Tomcat 8.0.42 and later, 8.5.12 and later, and 9.0.0 and later.

You can try updating Tomcat to version 8.0.42 or later to resolve this issue. We also suggest you to please check the following link.

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