helloWorld.ear - helloWorld-ejb.jar - HelloBean - @Stateless EJB extends AbstractBean - lib - helloWorld-api.jar - META-INF - jandex.idx - Hello - EJB interface - AbstractBean - abstract class which has @PostConstruct and implements Hello helloWorld2.ear - helloWorld2-ejb.jar - HelloBean2 - @Startup @Singleton extends AbstractBean - META-INF - jboss-deployment-structure.xml depends on deployment.helloWorld.ear export=true annotations=true To have HelloBean2 pickup the annotations on AbstractBean, jandex.idx was generate for the helloWorld-api.jar and then the j-d-s.xml file dependency has export=true so helloWorld2-ejb.jar sees the classes and annotations=true set to pull in the annotations. When annotations is not set or annotations=false the helloWorld2.ear deploys (but the @PostConstruct is not run since annotations are not enabled). When annotations=true is set, helloWorld2.ear fails to deploy with the exception below. It looks like the annotations handling is possibly out of order as the j-d-s.xml dependency should ensure the deployment.helloWorld.ear module is there (which it does when annotations=false, but when true it seems the module is not ready) 19:26:59,773 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-1) MSC000001: Failed to start service jboss.deployment.unit."helloWorld2.ear".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."helloWorld2.ear".PARSE: JBAS018733: Failed to process phase PARSE of deployment "helloWorld2.ear" at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:166) [jboss-as-server-7.5.9.Final-redhat-2.jar:7.5.9.Final-redhat-2] at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1980) [jboss-msc-1.1.6.Final-redhat-1.jar:1.1.6.Final-redhat-1] at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1913) [jboss-msc-1.1.6.Final-redhat-1.jar:1.1.6.Final-redhat-1] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_101] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_101] at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_101] Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: org.jboss.modules.ModuleNotFoundException: deployment.helloWorld.ear:main at org.jboss.as.server.deployment.annotation.CompositeIndexProcessor.deploy(CompositeIndexProcessor.java:83) [jboss-as-server-7.5.9.Final-redhat-2.jar:7.5.9.Final-redhat-2] at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:159) [jboss-as-server-7.5.9.Final-redhat-2.jar:7.5.9.Final-redhat-2] ... 5 more Caused by: org.jboss.modules.ModuleNotFoundException: deployment.helloWorld.ear:main at org.jboss.modules.ModuleLoader.loadModule(ModuleLoader.java:240) [jboss-modules.jar:1.3.7.Final-redhat-1] at org.jboss.as.server.deployment.annotation.CompositeIndexProcessor.deploy(CompositeIndexProcessor.java:74) [jboss-as-server-7.5.9.Final-redhat-2.jar:7.5.9.Final-redhat-2] ... 6 more A workaround is putting a jboss-all.xml in helloWorld2.ear/META-INF/ to make a blanket dependency on helloWorld.ear so that helloWorld2.ear is not started until after helloWorld.ear, but this should not be necessary: <jboss umlns="urn:jboss:1.0"> <jboss-deployment-dependencies xmlns="urn:jboss:deployment-dependencies:1.0"> <dependency name="helloWorld.ear" /> </jboss-deployment-dependencies> </jboss>
Created attachment 1182302 [details] reproducer Reproducer , unzip the example.zip into the deployments dir and start JBOss
Verified with EAP 6.4.11.CP.CR1;
Retroactively bulk-closing issues from released EAP 6.4 cummulative patches.
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.