从EAP 6.3到EAP 7.3的Jboss迁移-资源适配器不起作用

时间:2020-10-03 17:28:38

标签: java migration ibm-mq jboss7.x message-queue

在EAP 6.3环境中,将Java与IBM MQ和wmq.jmsra-7.5.0.7.rar一起使用Java,我的应用程序运行正常。现在由于迁移到EAP 7.3,在启动服务器时出现以下错误,并且厌倦了寻找解决方案。请协助我解决此问题。

ERROR [org.jboss.msc.service.fail] (MSC service thread 1-2) MSC000001: Failed to start service jboss.deployment.subunit."Global-ear.ear"."Global-ejb.jar".component.ReceivingMsgFromRTL.CREATE: org.jboss.msc.service.StartException in service jboss.deployment.subunit."Global-ear.ear"."Global-ejb.jar".component.ReceivingMsgFromRTL.CREATE: Failed to start service
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1731)
              at org.jboss.msc.service.ServiceControllerImpl$ControllerTask.run(ServiceControllerImpl.java:1559)
              at org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
              at org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1982)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1486)
              at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1363)
              at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.IllegalStateException: WFLYEJB0383: No message listener of type javax.jms.MessageListener found in resource adapter wmq.jmsra-7.5.0.7.rar
              at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createActivationSpecs(MessageDrivenComponentCreateService.java:142)
              at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.createComponent(MessageDrivenComponentCreateService.java:105)
              at org.jboss.as.ee.component.BasicComponentCreateService.start(BasicComponentCreateService.java:86)
              at org.jboss.as.ejb3.component.messagedriven.MessageDrivenComponentCreateService.start(MessageDrivenComponentCreateService.java:93)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1739)
              at org.jboss.msc.service.ServiceControllerImpl$StartTask.execute(ServiceControllerImpl.java:1701)
              ... 6 more

ERROR [org.jboss.as.controller.management-operation] (Controller Boot Thread) WFLYCTL0013: Operation ("deploy") failed - address: ([("deployment" => "Global-ear.ear")]) - failure description: {"WFLYCTL0080: Failed services" => {
    "jboss.deployment.subunit.\"Global-ear.ear\".\"Global-ejb.jar\".component.ReceivingMsgFromRTL.CREATE" => "Failed to start service
    Caused by: java.lang.IllegalStateException: WFLYEJB0383: No message listener of type javax.jms.MessageListener found in resource adapter wmq.jmsra-7.5.0.7.rar",

INFO  [org.jboss.as.controller] (Controller Boot Thread) WFLYCTL0183: Service status report
WFLYCTL0186:   Services which failed to start:      service jboss.deployment.subunit."Global-ear.ear"."Global-ejb.jar".component.ReceivingMsgFromRTL.CREATE: Failed to start service
WFLYCTL0448: 15 additional services are down due to their dependencies being missing or failed

这是我在独立xml 中使用的配置信息。

<system-properties>
    <property name="org.apache.tomcat.util.http.Parameters.MAX_COUNT" value="50000"/>
    <property name="websphere.hostNameEDWReceive" value="WMQ_XXXXXX.yyy.zzz"/>
    <property name="websphere.portEDWReceive" value="12345"/>
    <property name="websphere.channelEDWReceive" value="XXXXXX.CLIENT"/>
    <property name="websphere.transportType" value="CLIENT"/>
    <property name="websphere.queueManagerEDWReceive" value="XXXXXX"/>
    <property name="websphere.resource.adapter" value="wmq.jmsra-7.5.0.7.rar"/>
    <property name="websphere.ReceiveFrmMFeDWRTL" value="VCS.NCI.RTL.ZOS"/>
</system-properties>

<subsystem xmlns="urn:jboss:domain:ejb3:6.0">
    <mdb>
        <resource-adapter-ref resource-adapter-name="wmq.jmsra-7.5.0.7.rar"/>
        <bean-instance-pool-ref pool-name="mdb-strict-max-pool"/>
    </mdb>

<subsystem xmlns="urn:jboss:domain:resource-adapters:5.0">
    <resource-adapters>
        <resource-adapter id="wmq.jmsra-7.5.0.7.rar">
            <archive>
                wmq.jmsra-7.5.0.7.rar
            </archive>
            <transaction-support>XATransaction</transaction-support>
            <config-property name="connectionConcurrency">2</config-property>
            <connection-definitions>
                <connection-definition class-name="com.ibm.mq.connector.outbound.ManagedConnectionFactoryImpl" jndi-name="java:/jboss/jms/wmq/connectionFactory" use-java-context="true" pool-name="MQConnectionFactory" use-ccm="true">
                    <config-property name="channel">${websphere.channelEDWReceive:XXXXX.CLIENT}</config-property>
                    <config-property name="hostName">${websphere.hostNameEDWReceive:WMQ_XXXXX.yyy.zzz}</config-property>
                    <config-property name="transportType">${websphere.transportType:CLIENT}</config-property>
                    <config-property name="queueManager">${websphere.queueManagerEDWReceive:XXXXX}</config-property>
                    <config-property name="port">${websphere.portEDWReceive:12345}</config-property>
                    <xa-pool>
                        <min-pool-size>10</min-pool-size>
                        <max-pool-size>20</max-pool-size>
                        <prefill>true</prefill>
                        <use-strict-min>true</use-strict-min>
                        <flush-strategy>FailingConnectionOnly</flush-strategy>
                    </xa-pool>
                    <timeout>
                        <allocation-retry>3</allocation-retry>
                        <allocation-retry-wait-millis>5000</allocation-retry-wait-millis>
                    </timeout>
                    <recovery no-recovery="true"/>
                </connection-definition>
            </connection-definitions>
            <admin-objects>
                <admin-object class-name="com.ibm.mq.connector.outbound.MQQueueProxy" jndi-name="java:/jboss/jms/wmq/queue/ReceiveFrmMFeDWRTL" use-java-context="true" pool-name="ReceiveFrmMFeDWRTLPool">
                    <config-property name="baseQueueName">${websphere.ReceiveFrmMFeDWRTL:VCS.NCI.RTL.ZOS}</config-property>
                    <config-property name="baseQueueManagerName">${websphere.queueManagerEDWReceive:XXXXX}</config-property>
                </admin-object>
            </admin-objects>
        </resource-adapter>
    </resource-adapters>
</subsystem>

ejb-jar.xml

<message-driven>
  <description>ReceivingMsgFromRTL</description>
  <ejb-name>ReceivingMsgFromRTL</ejb-name>
  <ejb-class>com.nissan.nciservices.global.ejb.ReceivingMsgFromRTL</ejb-class>
  <transaction-type>Container</transaction-type>
  <message-destination-type>javax.jms.Queue</message-destination-type>
</message-driven>

jboss-ejb3.xml

<jee:message-driven>
      <jee:ejb-name>ReceivingMsgFromRTL</jee:ejb-name>
      <jee:ejb-class>com.nissan.nciservices.global.ejb.ReceivingMsgFromRTL</jee:ejb-class>
      <jee:transaction-type>Container</jee:transaction-type>
      <jee:message-destination-type>javax.jms.Queue</jee:message-destination-type>
      <jee:activation-config>
        <jee:activation-config-property>
          <jee:activation-config-property-name>channel</jee:activation-config-property-name>
          <jee:activation-config-property-value>${websphere.channelEDWReceive}</jee:activation-config-property-value>
        </jee:activation-config-property>
        <jee:activation-config-property>
          <jee:activation-config-property-name>queueManager</jee:activation-config-property-name>
          <jee:activation-config-property-value>${websphere.queueManagerEDWReceive}</jee:activation-config-property-value>
        </jee:activation-config-property>
        <jee:activation-config-property>
          <jee:activation-config-property-name>transportType</jee:activation-config-property-name>
          <jee:activation-config-property-value>${websphere.transportType}</jee:activation-config-property-value>
        </jee:activation-config-property>
        <jee:activation-config-property>
          <jee:activation-config-property-name>hostName</jee:activation-config-property-name>
          <jee:activation-config-property-value>${websphere.hostNameEDWReceive}</jee:activation-config-property-value>
        </jee:activation-config-property>
        <jee:activation-config-property>
          <jee:activation-config-property-name>port</jee:activation-config-property-name>
          <jee:activation-config-property-value>${websphere.portEDWReceive}</jee:activation-config-property-value>
        </jee:activation-config-property>
        <jee:activation-config-property>
          <jee:activation-config-property-name>destination</jee:activation-config-property-name>
          <jee:activation-config-property-value>java:/jboss/jms/wmq/queue/ReceiveFrmMFeDWRTL</jee:activation-config-property-value>
        </jee:activation-config-property>
        <jee:activation-config-property>
          <jee:activation-config-property-name>useJNDI</jee:activation-config-property-name>
          <jee:activation-config-property-value>true</jee:activation-config-property-value>
        </jee:activation-config-property>
        <jee:activation-config-property>
          <jee:activation-config-property-name>destinationType</jee:activation-config-property-name>
          <jee:activation-config-property-value>javax.jms.Queue</jee:activation-config-property-value>
        </jee:activation-config-property>
      </jee:activation-config>
    </jee:message-driven>

0 个答案:

没有答案