21

将企业归档 jar (.ear)部署到 JBoss 7时出现以下错误。

有人可以给我指点如何解决这个问题。

JBoss 日志是

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
4

4 回答 4

30

问题是您正在尝试将具有 MDB 的应用程序部署到未启用消息传递支持的standalone.xml 配置。(缺少消息子系统)

如果您使用standalone-full.xml 运行服务器,它会起作用。

你可以通过运行来做到这一点:

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

在 Linux 或

standalone.bat -c standalone-full.xml

在窗户上

于 2013-03-29T00:58:45.943 回答
6

在 Jboss 7.x 中我们需要添加

<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>
            ...

并希望它会奏效。

于 2013-04-06T19:21:07.237 回答
3

我有完全相同的问题,发现我失踪了

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

在下面

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

在独立/配置/standalone.xml

于 2014-12-17T06:59:29.623 回答
-1

在 Wildfly 10 上,它是(也在部分):

    <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>
于 2017-06-16T06:16:57.307 回答