How to create a jandex index for a jar so that JBoss EAP 6 or EAP 7 modules will scan a modules annotations
Issue
- How to create a jandex index for a jar so that JBoss EAP 6 modules will scan a modules annotations?
- I have a custom module in the modules directory, when I depend on the module I can see the classes, but the annotations are being ignored, how do I fix this?
- I use inheritance in my application and the superclass is located in a module, it seems that the annotations are not scanned here
- The @PostConstruct method of an abstract superclass within a static JBoss module is not called.
- When the
annotations
flag is added to a module in EAP 7 the deployment time of my application increases and a lot of CPU is consumed. - To integrate with azure ad, developers changed Spring Boot version of application to latest as azure ad is using newer version of spring security. When the new built war file is deployed in JBoss EAP 6.4.19, the application is failing. The JBoss EAP starts up with several exceptions and warnings like mentioned below :
12:51:50,205 WARN [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015852: Could not index class module-info.class at /content/example.war/WEB-INF/lib/azure-core-1.2.0.jar: java.lang.IllegalStateException: Unknown tag! pos=4 poolCount = 87
at org.jboss.jandex.Indexer.processConstantPool(Indexer.java:673) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.jandex.Indexer.index(Indexer.java:707) [jandex-1.2.5.Final-redhat-1.jar:1.2.5.Final-redhat-1]
at org.jboss.as.server.deployment.annotation.ResourceRootIndexer.indexResourceRoot(ResourceRootIndexer.java:100) [jboss-as-server-7.5.19.Final-redhat-2.jar:7.5.19.Final-redhat-2]
at org.jboss.as.server.deployment.annotation.AnnotationIndexProcessor.deploy(AnnotationIndexProcessor.java:51) [jboss-as-server-7.5.19.Final-redhat-2.jar:7.5.19.Final-redhat-2]
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:177) [jboss-as-server-7.5.19.Final-redhat-2.jar:7.5.19.Final-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:2064) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1987) [jboss-msc-1.1.7.SP1-redhat-1.jar:1.1.7.SP1-redhat-1]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_191]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_191]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_191]
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.x
- 7.x
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.