Jboss7: Ошибка при попытке разрешить имя JNDI "java: / XAConnectionFactory": javax.naming.NameNotFoundException: XAConnectionFactory - PullRequest
0 голосов
/ 15 апреля 2020

Я обновлял приложение ATG с 10.x до 11.x. Я также обновил jboss-eap с 5.1 до 7.2. Я столкнулся с различными проблемами JBoss, и многие из них были исправлены.

На данный момент мы получаем следующую ошибку при запуске сервера выполнения ATG, и, похоже, это проблема JBoss JMS.

07:56:43,346 ERROR [nucleusNamespace.atg.dynamo.messaging.MessagingManager] (ServerService Thread Pool -- 81) PatchBay failed to startup properly : a Scheduler job will be registered to continue trying to bring PatchBay up : note this may result in further errors: atg.nucleus.ServiceException: An error occurred trying to resolve JNDI name "java:/XAConnectionFactory" for the "xa-topic-connection-factory-name" in provider "Hornet" in definition file "/atg/dynamo/messaging/dynamoMessagingSystem.xml": javax.naming.NameNotFoundException: XAConnectionFactory -- service jboss.naming.context.java.XAConnectionFactory
    at atg.dms.patchbay.Provider.initializeTopicConnection(Provider.java:364)
    at atg.dms.patchbay.PatchBayManager.createInputDestination(PatchBayManager.java:1811)
    at atg.dms.patchbay.PatchBayManager.createInputPorts(PatchBayManager.java:1446)
    at atg.dms.patchbay.PatchBayManager.createElementManager(PatchBayManager.java:1477)
    at atg.dms.patchbay.PatchBayManager.createMessageFilters(PatchBayManager.java:1338)

В Jboss 5 были следующие файлы конфигурации:

ls jboss-eap-5.1/seam/bootstrap/deploy/messaging/
connection-factories-service.xml  hsqldb-persistence-service.xml  legacy-service.xml     remoting-service.xml
destinations-service.xml          jms-ds.xml                      messaging-service.xml

В Jboss 7.2 в автономном режиме мы имеем следующую конфигурацию сообщений. xml файл:

        <subsystem xmlns="urn:jboss:domain:messaging-activemq:4.0">
            <server name="default">
                <journal pool-files="10"/>
                <security-setting name="#">
                    <role name="guest" send="true" consume="true" create-non-durable-queue="true" delete-non-durable-queue="true"/>
                </security-setting>
                <address-setting name="#" dead-letter-address="jms.queue.DLQ" expiry-address="jms.queue.ExpiryQueue" max-size-bytes="10485760" page-size-bytes="2097152" message-counter-history-day-limit="10"/>
                <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>
                <http-connector name="http-connector-throughput" socket-binding="http" endpoint="http-acceptor-throughput">
                    <param name="batch-delay" value="50"/>
                </http-connector>
                <in-vm-connector name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-connector>
                <http-acceptor name="http-acceptor" http-listener="default"/>
                <http-acceptor name="http-acceptor-throughput" http-listener="default">
                    <param name="batch-delay" value="50"/>
                    <param name="direct-deliver" value="false"/>
                </http-acceptor>
                <in-vm-acceptor name="in-vm" server-id="0">
                    <param name="buffer-pooling" value="false"/>
                </in-vm-acceptor>
                <jms-queue name="ExpiryQueue" entries="java:/jms/queue/ExpiryQueue"/>
                <jms-queue name="DLQ" entries="java:/jms/queue/DLQ"/>
                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>
                <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="http-connector"/>
                <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory" connectors="in-vm" transaction="xa"/>
            </server>
        </subsystem>        

Ниже приведено содержимое atg / динамо / сообщения / DynamoMessagingSystem. xml в коде

<?xml version="1.0" encoding="UTF-8"?>

<dynamo-message-system>
  <patchbay>
    <!-- JBoss Hornet provider -->
    <provider>
      <provider-name>Hornet</provider-name>
      <xa-topic-connection-factory-name>
        java:/XAConnectionFactory
      </xa-topic-connection-factory-name>
      <xa-queue-connection-factory-name>
        java:/XAConnectionFactory
      </xa-queue-connection-factory-name>
      <supports-transactions>
        true
      </supports-transactions>
      <supports-xa-transactions>
        true
      </supports-xa-transactions>
      <username>***</username>
      <password>***</password>
      <initial-context-factory>
        /abcd/common/services/HornetQ
      </initial-context-factory>
    </provider>
    <!-- Reporting order message source -->
    <message-source>
      <nucleus-name>/abcd/commerce/fulfillment/processor/SendReportingSubmitOrderMessage</nucleus-name>
      <output-port>
        <port-name>ReportingOrderSubmit</port-name>
        <output-destination>
          <provider-name>local</provider-name>
          <destination-name>localdms:/local/Fulfillment/LocalSubmitOrder</destination-name>
          <destination-type>Topic</destination-type>
        </output-destination>
      </output-port>
    </message-source>
    <!-- Split order message source -->
    <message-source>
      <nucleus-name>/abcd/commerce/fulfillment/processor/SendSplitMessages/</nucleus-name>
      <output-port>
        <port-name>DEFAULT</port-name>
      </output-port>
      <output-port>
        <port-name>FulfillmentOrderSubmitPort</port-name>
        <output-destination>
          <destination-name>patchbay:/Fulfillment/SubmitOrder</destination-name>
          <destination-type>Topic</destination-type>
        </output-destination>
      </output-port>
    </message-source>
    <!-- Custom source/sink will take fulfillment failures and forward them, perhaps to multiple queues or none -->
    <message-source>
      <nucleus-name>
        /abcd/commerce/fulfillment/FailureMessageSink
      </nucleus-name>
      <output-port>
        <port-name>
          FulfillmentFailureNotifications
        </port-name>
        <output-destination>
          <destination-name>
            patchbay:/Fulfillment/FulfillmentFailureNotifications
          </destination-name>
          <destination-type>
            Topic
          </destination-type>
        </output-destination>
      </output-port>
    </message-source>

    <!-- Custom source/sink will take fulfillment failures and forward them, perhaps to multiple queues or none -->
    <message-sink>
      <nucleus-name>
        /abcd/commerce/fulfillment/FailureMessageSink
      </nucleus-name>
      <input-port>
        <port-name>FulfillmentError</port-name>
        <input-destination>
          <destination-name>patchbay:/Fulfillment/ErrorNotification</destination-name>
          <destination-type>Queue</destination-type>
        </input-destination>
      </input-port>
    </message-sink>

Я новичок в jboss и ATG, Может кто-нибудь помочь мне решить проблему

1 Ответ

0 голосов
/ 15 апреля 2020

java:/XAConnectionFactory не определено в WildFly. Вам необходимо настроить WildFly для правильного создания и предоставления таких фабрик соединений, как это:

<pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory java:/XAConnectionFactory" connectors="in-vm" transaction="xa"/>

Обратите внимание, что вы сейчас используете Apache ActiveMQ Artemis и больше не используете HornetQ

...