1 Reply Latest reply on Jan 17, 2018 10:32 AM by crinaboitor

    Wildfly 10.x not connecting to remote HornetQ standalone server after migration

    crinaboitor

      Hi all,

       

      I am migrating an application from JBoss 9  to Wildly 10.x but I am having some problems with the connection to the message broker (remote standalone HornetQ)

      With Jboss 9, the connection was working.

      I applied the Backward Compatibility Section instructions but with no success.

       

      The current MDBs look like this:

      @MessageDriven(name = "HPWOProcessorMDB",
         activationConfig =

        {

         @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
         @ActivationConfigProperty(propertyName = "destinationLookup", propertyValue = "queue/HPWOQueue"),
         @ActivationConfigProperty(propertyName = "acknowledgeMode", propertyValue = "Auto-acknowledge"),
         @ActivationConfigProperty(propertyName = "useDLQ", propertyValue = "false"),
         @ActivationConfigProperty(propertyName = "UseJNDI", propertyValue = "false"),
         @ActivationConfigProperty(propertyName = "hA", propertyValue = "true"),
         @ActivationConfigProperty(propertyName = "transactionTimeout", propertyValue = "1200"),
         @ActivationConfigProperty(propertyName = "reconnectAttempts", propertyValue = "-1"),
         @ActivationConfigProperty(propertyName = "setupAttempts", propertyValue = "-1"),
         @ActivationConfigProperty(propertyName = "connectorClassName", propertyValue = "org.apache.activemq.artemis.core.remoting.impl.netty.NettyConnectorFactory"),
         @ActivationConfigProperty(propertyName = "connectionParameters", propertyValue = "host=@hornetq-ip@;port=5446;httpUpgradeEnabled")

       

        })

       

      with the last two properties added after migration.

       

      In the standalone-full.xml I have:

       

      <subsystem xmlns="urn:jboss:domain:messaging-activemq:1.0">

                <server name="default" persistence-enabled="false">

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

       

                <remote-connector name="netty" socket-binding="remote-messaging"/>

              

                <in-vm-connector name="in-vm" server-id="0"/>

                <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"/>

             

                <jms-queue name="WODLQ" entries="queue/WODLQ"/>

                <jms-queue name="ExpiryQueue" entries="queue/ExpiryQueue"/>

                <jms-queue name="HPWOQueue" entries="queue/HPWOQueue"/>

                <jms-queue name="MPWOQueue" entries="queue/MPWOQueue"/>

                <jms-queue name="LPWOQueue" entries="queue/LPWOQueue"/>

                <jms-queue name="ResponseSyncQueue" entries="queue/ResponseSyncQueue"/>

                <jms-queue name="RestoreSQ" entries="queue/RestoreSQ"/>

                <jms-queue name="DLQ" entries="queue/DLQ"/>

       

                <connection-factory name="InVmConnectionFactory" entries="java:/ConnectionFactory" connectors="in-vm"/>

              

                <pooled-connection-factory name="activemq-ra" entries="java:/JmsXA java:jboss/DefaultJMSConnectionFactory"

                     protocol-manager-factory="org.apache.activemq.artemis.core.protocol.hornetq.client.HornetQClientProtocolManagerFactory" connectors="netty" transaction="xa"/>

       

      </server>

      </subsystem>

      [...]

      <outbound-socket-binding name="remote-messaging">

                  <remote-destination host="@hornetq-ip@" port="5446"/>

      </outbound-socket-binding>

       

      The pooled-connection is injected as it was before:

      @Inject
      @JMSConnectionFactory("java:/JmsXA")

      @JMSSessionMode(JMSContext.AUTO_ACKNOWLEDGE)

      private JMSContext jmsContext;

       

      However, besides this WARN (which I believe is related to the previous configuration), the application fails to connect to HornetQ after deployment:

       

      14:32:38,058 WARN  [ActiveMQXAResourceWrapper] (Periodic Recovery) AMQ122008: XA Recovery can not connect to any broker on recovery [XARecoveryConfig [transportConfiguration=[TransportConfiguration(name=, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=5446&host=jboss9srv, TransportConfiguration(name=, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=5447&host=0-0-0-0], discoveryConfiguration=null, username=null, password=****, JNDI_NAME=java:/JmsXA]]

       

      14:34:48,060 WARN  [ActiveMQXAResourceWrapper] (Periodic Recovery) AMQ122015: Can not connect to XARecoveryConfig [transportConfiguration=[TransportConfiguration(name=, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=5446&host=jboss9srv, TransportConfiguration(name=, factory=org-hornetq-core-remoting-impl-netty-NettyConnectorFactory) ?port=5447&host=0-0-0-0], discoveryConfiguration=null, username=null, password=****, JNDI_NAME=java:/JmsXA] on auto-generated resource recovery:

      java.lang.IllegalStateException: java.lang.ClassNotFoundException: org.hornetq.core.remoting.impl.netty.NettyConnectorFactory from [Module "org.jboss.jts:main" from local module loader...]

       

      Caused by: java.lang.ClassNotFoundException: org.hornetq.core.remoting.impl.netty.NettyConnectorFactory from [Module "org.jboss.jts:main" from local module loader...

       

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:198) [jboss-modules.jar:1.5.2.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClassUnchecked(ConcurrentClassLoader.java:363) [jboss-modules.jar:1.5.2.Final]

          at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:351) [jboss-modules.jar:1.5.2.Final]

          at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:93) [jboss-modules.jar:1.5.2.Final]

          at org.apache.activemq.artemis.utils.ClassloadingUtil.newInstanceFromClassLoader(ClassloadingUtil.java:46) [artemis-commons-1.5.3.jbossorg-003.jar:1.5.3.jbossorg-003].

       

      If anyone who has encountered this problem, I am looking forward to any suggestions.

       

      Thanks