Error while trying to attach JavaMelody to a EAR in JBoss 7.1.3

639 views
Skip to first unread message

sergey.k...@gmail.com

unread,
Jul 22, 2015, 5:50:42 AM7/22/15
to javamelody
Hello,
I'm trying to use JavaMail with my application
which is a EAR running inside JBoss 7.1.3 application server.

I've edited the application.xml like described here: https://github.com/javamelody/javamelody/wiki/UserGuideAdvanced#1-jar-files

but now JBoss complains about that:

09:18:24,403 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."Synergy.ear".STRUCTURE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Synergy.ear".STRUCTURE: JBAS018733: Failed to process phase STRUCTURE of deployment "Synergy.ear"
        at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:123) [jboss-as-server-7.1.3.Final-SNAPSHOT.jar:7.1.3.Final-SNAPSHOT]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1811) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1746) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_26]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [rt.jar:1.6.0_26]
        at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_26]
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/javamelody.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-SNAPSHOT.jar:7.1.3.Final-SNAPSHOT]
        ... 5 more

What should I do now?

wlf...@gmail.com

unread,
Sep 16, 2015, 7:02:24 AM9/16/15
to javamelody, sergey.k...@gmail.com
Same issue here, Jboss EAP 6.2.  Using Maven2 for packaging (including application.xml) and jboss-as-maven-plugin for deployment.

wlf...@gmail.com

unread,
Sep 16, 2015, 7:25:26 AM9/16/15
to javamelody, sergey.k...@gmail.com

This seems to have done the trick for me:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-ear-plugin</artifactId>
<configuration>
<defaultLibBundleDir>lib</defaultLibBundleDir>
<modules>
<jarModule>
<groupId>net.bull.javamelody</groupId>
<artifactId>javamelody-core</artifactId>
<includeInApplicationXml>true</includeInApplicationXml>
<bundleDir>/</bundleDir> <----- added this: deploy success
</jarModule>
<ejbModule>
<groupId>be.hfa.payment</groupId>
<artifactId>payment-baseservice-wsbackend</artifactId>
</ejbModule>
<webModule>
<groupId>be.hfa.payment</groupId>
<artifactId>payment-baseservice-ws</artifactId>
<contextRoot>/service/base/payment/v1</contextRoot>
</webModule>
</modules>
</configuration>
</plugin>


On Wednesday, July 22, 2015 at 11:50:42 AM UTC+2, sergey.k...@gmail.com wrote:
Reply all
Reply to author
Forward
0 new messages