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