3

Due the issue on log4j (CVE-2021-44228) I migrate some apps to log4j 2.15.0 (using JBoss EAP 7.1 with jdk 1.8.0_211-b12) without any issues. I'd like now to migrate from log4j 2.15.0 to 2.16.0.

When I try it I've the following error

 15:20:59,361 WARN [org.jboss.as.server.deployment] (MSC service thread
 1-8) WFLYSRV0003: Could not index class
 META-INF/versions/9/module-info.class  at
 /C:/jboss-eap-7.1/standalone/deployments/myApp-SNAPSHOT.war/WEB-INF/lib/log4j-api-2.16.0.jar:
 java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 32 at
 org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1417) at
 org.jboss.jandex.Indexer.index(Indexer.java:1451) at
 org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:99)
 at
 org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51)
 at
 org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:165)
 at
 org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2032)
 at
 org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1955)
 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)

It seems related with java version, especially because it's working for JBoss EAP 7.3 with jdk 11 but the official documentation says

"Log4j 2.16.0 is the latest release of Log4j. As of Log4j 2.13.0 Log4j 2 requires Java 8 or greater at runtime. This release contains new features and fixes which can be found in the latest changes report."

https://logging.apache.org/log4j/2.x/index.html

Anyone with the same problem?

Edit: After rebuild all the porject I realize that this stack wasn't causing the crash. Since it's a warning I'll just ignore it

JMarques
  • 3,044
  • 4
  • 34
  • 55
  • I have same problem with jdk8 and EAP 6.4. still researching what causing the issue. – David Abragimov Dec 14 '21 at 20:35
  • Please note that I have same problem with 2.15.0. looks like some jboss specific compatibility problem https://stackoverflow.com/questions/64790738/jboss-eap-7-0-java-lang-illegalstateexception-unknown-tag-pos-3-poolcount-20 and https://stackoverflow.com/questions/28935841/jbas015852-could-not-index-class-java-lang-illegalstateexception-unknown-tag – David Abragimov Dec 14 '21 at 21:23
  • Having the same problem with log4j 2.16.0 with Wildfly 10 – Jai Dec 15 '21 at 17:07
  • Just for the context, after rebuild all the project from scratch I could run the project.. I still have this message but it's a warning so I'll keep the warning and move on =) – JMarques Dec 17 '21 at 09:18

1 Answers1

1

I had same problem with log4j 2.16.0 and WildFly 10.1. I tried to update WildFly from 10.1 to 13.0 and resolved that error.

The problem have been fixed on WildFly 13.0 ( https://issues.redhat.com/browse/WFLY-9608 ).

It seems that JBoss EAP 7.2 is equivalent to WildFly 14.0.

http://www.mastertheboss.com/jbossas/jboss-eap/what-is-the-difference-between-jboss-eap-wildfly-and-jboss-as/

So you should update JBoss EAP newer than 7.2.

Wataru
  • 391
  • 3
  • 11