17
votes

We have updated log4j jar from log4j-api-2.7.jar to log4j-api-2.10.0.jar. We are getting below warning at the startup of JBoss(we are using JBoss-EAP-7.0).

2018-09-05 05:31:28,669 WARN [org.jboss.as.server.deployment] (MSC service thread 1-2) WFLYSRV0003: Could not index class module-info.class at /content/project.ear/shared/log4j-api.jar: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 24 at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:1416) at org.jboss.jandex.Indexer.index(Indexer.java:1450) 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)

After my analysis it seems that module-info.class is newly introduced in log4j-api-2.10.0.jar and now it is not able to index that class on startup. It is using JBoss's jandex-2.0.2.Final-redhat-1.jar for the same which is coming from dependency information of eap-runtime-artifacts-7.0.5.GA.pom.

Can anyone please help me to resolve this issue?

Thanks in Advance.

2

2 Answers

12
votes

First of all this is only a warning.

I guess you are using a Java Version lower than 8. The module-info.class is used for so called Multi release jar's (jars that are comptible with all java version).

Java until Version 8 are not 100% compatible with this technique. So the only way i see is upgrade your Java Version to 1.8 or downgrade log4j

0
votes

This is a warning message, it occured because of jandex supports Java9 is to simply ignore module-info.class files in dependent archives. To avoid this warning messages, replace jandex jar present in (wildfly_HOME\modules\system\layers\base\org\jboss\jandex\main\jande-version.jar with jandex-2.0.5.Final-redhat-1 and the respective module.xml also. Ref : https://issues.redhat.com/browse/JBEAP-15262 https://issues.redhat.com/browse/JBEAP-15715