Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error when deploying an .ear file containing an MDB to JBoss

Tags:

I am getting the below error while deploying an enterprise archive jar (.ear) to JBoss 7.

Can someone please give me pointers on how to resolve this.

The JBoss log is

14:44:30,812 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC00001: Failed to start service jboss.deployment.unit."Demo2.jar".PARSE: org.jboss.msc.service.StartException in service jboss.deployment.unit."Demo2.jar".PARSE: Failed to process phase PARSE of deployment "Demo2.jar"     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:119) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]     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.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_17]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_17]     at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_17] Caused by: org.jboss.msc.service.ServiceNotFoundException: Service service jboss.ejb.default-resource-adapter-name-service not found     at org.jboss.msc.service.ServiceContainerImpl.getRequiredService(ServiceContainerImpl.java:447) [jboss-msc-1.0.2.GA.jar:1.0.2.GA]     at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.getDefaultResourceAdapterName(MessageDrivenComponentDescriptionFactory.java:273)     at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processMessageBeans(MessageDrivenComponentDescriptionFactory.java:153)     at org.jboss.as.ejb3.deployment.processors.MessageDrivenComponentDescriptionFactory.processAnnotations(MessageDrivenComponentDescriptionFactory.java:81)     at org.jboss.as.ejb3.deployment.processors.AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.processAnnotations(AnnotatedEJBComponentDescriptionDeploymentUnitProcessor.java:58)     at org.jboss.as.ejb3.deployment.processors.AbstractDeploymentUnitProcessor.deploy(AbstractDeploymentUnitProcessor.java:81)     at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:113) [jboss-as-server-7.1.1.Final.jar:7.1.1.Final]     ... 5 more 
like image 578
Student Avatar asked Mar 27 '13 21:03

Student


2 Answers

Problem is that you are trying to deploy application with MDBs to standalone.xml configuration that does not have messaging support enabled. (messaging subsystem is missing)

if you would run server with standalone-full.xml it would work.

you can do that by running:

./standalone.sh -c standalone-full.xml 

on linux or

standalone.bat -c standalone-full.xml 

on windows

like image 92
Tomaz Cerar Avatar answered Sep 17 '22 16:09

Tomaz Cerar


In Jboss 7.x we need to add

<subsystem xmlns="urn:jboss:domain:ejb3:1.2">             ...             <mdb>                 <resource-adapter-ref resource-adapter-name="hornetq-ra"/>                 <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>             </mdb>             ... 

And hope it will work.

like image 23
Prateek S Avatar answered Sep 19 '22 16:09

Prateek S