An ear file with modules in subfolders can not deploy under EAP6
Issue
- While creating an EAR if we place the modules of EAR inside some directory rather than the root of the EAR then it throws a warning in EAP6.
For Example the test application is as following:
eap6-ear-0.1.ear
├── ejb
│ └── TestSLSBDemo.jar
├── lib
│ └── Hello.jar
└── META-INF
├── application.xml
└── MANIFEST.MF
And the application.xml file has the following entry in it :
<!DOCTYPE application PUBLIC "-//Sun Microsystems, Inc.//DTD J2EE Application 1.2//EN" "http://java.sun.com/j2ee/dtds/application_1_2.dtd">
<application>
<display-name>eap6-ear</display-name>
<module id="eap6-ejb">
<ejb>ejb/TestSLSBDemo.jar</ejb>
</module>
<module>
<java>lib/Hello.jar</java>
</module>
</application>
The Application Fails with the following Exception:
10:30:35,835 INFO [org.jboss.as.server.deployment] (MSC service thread 1-4) JBAS015876: Starting deployment of "TestEJBRef_EAP6.ear"
10:30:35,921 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-7) MSC000001: Failed to start service jboss.deployment.unit."TestEJBRef_EAP6.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."TestEJBRef_EAP6.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "TestEJBRef_EAP6.ear"
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA-redhat-2.jar:1.0.2.GA-redhat-2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_05]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_05]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_05]
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS016703: Module may not be a child of the EAR's library directory. Library directory: lib, module file name: lib/Hello.jar
at org.jboss.as.ee.structure.EarStructureProcessor.deploy(EarStructureProcessor.java:182)
at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:116) [jboss-as-server-7.1.3.Final-redhat-4.jar:7.1.3.Final-redhat-4]
... 5 more
10:30:35,927 INFO [org.jboss.as.server.deployment] (MSC service thread 1-1) JBAS015877: Stopped deployment TestEJBRef_EAP6.ear in 0ms
10:30:35,926 INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS015870: Deploy of deployment "TestEJBRef_EAP6.ear" was rolled back with failure message {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"TestEJBRef_EAP6.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"TestEJBRef_EAP6.ear\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"TestEJBRef_EAP6.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS016703: Module may not be a child of the EAR's library directory. Library directory: lib, module file name: lib/Hello.jar"}}
10:30:35,929 ERROR [org.jboss.as.server.deployment.scanner] (DeploymentScanner-threads - 2) {"JBAS014653: Composite operation failed and was rolled back. Steps that failed:" => {"Operation step-2" => {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"TestEJBRef_EAP6.ear\".STRUCTURE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"TestEJBRef_EAP6.ear\".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment \"TestEJBRef_EAP6.ear\"
Caused by: org.jboss.as.server.deployment.DeploymentUnitProcessingException: JBAS016703: Module may not be a child of the EAR's library directory. Library directory: lib, module file name: lib/Hello.jar"}}}}
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4.0
- 6.3.z
- 6.2.z
- 6.1.z
- 6.0.z
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.