Getting "Unable to process Jar entry [module-info.class] from Jar ... for annotations" when packaging the newer log4j-api-2 jar in application on JWS 3 Tomcat

Solution Unverified - Updated -

Issue

when packaging the newer log4j-api-2 jar (for instance, log4j-api-2.11.1.jar) in the web application, the following log message "Unable to process Jar entry [module-info.class] from Jar ... for annotations" is output at JWS 3 Tomcat 7 start-up

SEVERE: Unable to process Jar entry [META-INF/versions/9/module-info.class] from Jar [jar:file:...(snip).../WEB-INF/lib/log4j-api-2.11.1.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(Unknown Source)
    at org.apache.tomcat.util.bcel.classfile.ConstantPool.<init>(Unknown Source)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.readConstantPool(Unknown Source)
    at org.apache.tomcat.util.bcel.classfile.ClassParser.parse(Unknown Source)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsStream(Unknown Source)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsJar(Unknown Source)
    at org.apache.catalina.startup.ContextConfig.processAnnotationsUrl(Unknown Source)
    at org.apache.catalina.startup.ContextConfig.processAnnotations(Unknown Source)
    at org.apache.catalina.startup.ContextConfig.webConfig(Unknown Source)
    at org.apache.catalina.startup.ContextConfig.configureStart(Unknown Source)
    at org.apache.catalina.startup.ContextConfig.lifecycleEvent(Unknown Source)
    at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(Unknown Source)
    at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(Unknown Source)
    at org.apache.catalina.core.StandardContext.startInternal(Unknown Source)
    at org.apache.catalina.util.LifecycleBase.start(Unknown Source)
    at org.apache.catalina.core.ContainerBase.addChildInternal(Unknown Source)
    at org.apache.catalina.core.ContainerBase.addChild(Unknown Source)
    at org.apache.catalina.core.StandardHost.addChild(Unknown Source)
    at org.apache.catalina.startup.HostConfig.deployDirectory(Unknown Source)
    at org.apache.catalina.startup.HostConfig$DeployDirectory.run(Unknown Source)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Environment

  • Red Hat JBoss Web Server (JWS)
    • 3.x
  • Tomcat 7
  • Tomcat 8

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In