Error when deploying an .ear file containing an MDB to JBoss
Asked Answered
N

4

21

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
Nigritude answered 27/3, 2013 at 21:59 Comment(1)
This looks like a config issue, what type of resource are you trying to look up? What standalone or domain profile are you using?Veterinarian
K
30

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

Kingwood answered 29/3, 2013 at 0:58 Comment(0)
W
6

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.

Walke answered 6/4, 2013 at 19:21 Comment(0)
H
3

I had the exact same problem, found that I was missing

<mdb>  
  <resource-adapter-ref resource-adapter-name="hornetq-ra"/>  
  <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>  
</mdb>  

under

<subsystem xmlns="urn:jboss:domain:ejb3:1.2">  

in standalone/configuration/standalone.xml

Holifield answered 17/12, 2014 at 6:59 Comment(0)
M
-1

On Wildfly 10 it is (also in section ):

    <mdb>
        <resource-adapter-ref resource-adapter-name="${ejb.resource-adapter-name:activemq-ra.rar}"/>
        <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
    </mdb>
Monogenetic answered 16/6, 2017 at 6:16 Comment(1)
You should explain your snippet to make your answer findable.Schooner

© 2022 - 2024 — McMap. All rights reserved.