0 Replies Latest reply on Aug 9, 2018 3:48 AM by Shanteshwar C

    Issue with hornetq NettyConnectorFactory - WildFly 10

    Shanteshwar C Newbie

      While migrating from JBoss EAP 6.4 to WildFly 10.1, we are facing an issue with hornetq NettyConnectorFactory

       

      Error is :

       

      11:22:59,017 ERROR [org.apache.activemq.artemis.core.client] (Thread-0 (ActiveMQ-server-org.apache.activemq.artemis.core.server.impl.ActiveMQServerImpl$2@54f2129d-1980641624)) AMQ214017: Caught unexpected Throwable: java.lang.IllegalStateException: java.lang.ClassNotFoundException: org.hornetq.core.remoting.impl.netty.NettyConnectorFactory from [Module "org.apache.activemq.artemis:main" from local module loader @4cdbe50f (finder: local module finder @66d33a (roots: /opt/app/workload/jboss/jboss-eap-7.0/modules,/opt/app/workload/jboss/jboss-eap-7.0/modules/system/layers/base/.overlays/layer-base-jboss-eap-7.0.8.CP,/opt/app/workload/jboss/jboss-eap-7.0/modules/system/layers/base))]

          at org.apache.activemq.artemis.utils.ClassloadingUtil.newInstanceFromClassLoader(ClassloadingUtil.java:53) [artemis-commons-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$2.run(ClientSessionFactoryImpl.java:952) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$2.run(ClientSessionFactoryImpl.java:950) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_66]

          at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.instantiateConnectorFactory(ClientSessionFactoryImpl.java:950) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl.<init>(ClientSessionFactoryImpl.java:179) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.createSessionFactory(ServerLocatorImpl.java:757) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:617) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl.connect(ServerLocatorImpl.java:598) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.core.server.cluster.ClusterController$ConnectRunnable.run(ClusterController.java:406) [artemis-server-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at org.apache.activemq.artemis.utils.OrderedExecutorFactory$OrderedExecutor$ExecutorTask.run(OrderedExecutorFactory.java:103) [artemis-core-client-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_66]

          at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_66]

          at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_66]

      Caused by: java.lang.ClassNotFoundException: org.hornetq.core.remoting.impl.netty.NettyConnectorFactory from [Module "org.apache.activemq.artemis:main" from local module loader @4cdbe50f (finder: local module finder @66d33a (roots: /opt/app/workload/jboss/jboss-eap-7.0/modules,/opt/app/workload/jboss/jboss-eap-7.0/modules/system/layers/base/.overlays/layer-base-jboss-eap-7.0.8.CP,/opt/app/workload/jboss/jboss-eap-7.0/modules/system/layers/base))]

          at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:196) [jboss-modules.jar:1.5.4.Final-redhat-1]

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

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

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

          at org.apache.activemq.artemis.utils.ClassloadingUtil.newInstanceFromClassLoader(ClassloadingUtil.java:47) [artemis-commons-1.1.0.SP21-redhat-1.jar:1.1.0.SP21-redhat-1]

          ... 13 more

       

      We have migrated the domain configuration by using migration tools. Configuration is as shown below:

       

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

                      <server name="default">

                          <cluster password="admin"/>

                          <journal type="NIO" file-size="102400"/>

                          <shared-store-master/>

                          <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" address-full-policy="BLOCK" message-counter-history-day-limit="10" redistribution-delay="1000"/>

                         

                          <http-connector name="http-connector" socket-binding="http" endpoint="http-acceptor"/>

                          <http-acceptor name="http-acceptor" http-listener="http"/>

                         

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

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

                              <param name="batch-delay" value="50"/>

                          </remote-connector>

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

                          <remote-acceptor name="netty-throughput" socket-binding="messaging-throughput">

                              <param name="batch-delay" value="50"/>

                              <param name="direct-deliver" value="false"/>

                          </remote-acceptor>                   

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

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

                         

                           <broadcast-group name="ft-group1" socket-binding="messaging-group" broadcast-period="5000" connectors="netty"/>

                          <discovery-group name="dg-group1" socket-binding="messaging-group" refresh-timeout="10000"/>

                          <cluster-connection name="my-cluster" address="jms" connector-name="netty" discovery-group="dg-group1"/>

                          <jms-queue name="abc.test.testCaseInvocationQueue" entries="java:jboss/jms/queue/abc.test.testCaseInvocationQueue" durable="false"/>

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

                          <connection-factory name="RemoteConnectionFactory" entries="java:jboss/exported/jms/RemoteConnectionFactory" connectors="netty" ha="true" block-on-acknowledge="true" retry-interval="1000" retry-interval-multiplier="1.0" reconnect-attempts="-1"/>

                         

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

                      </server>

                  </subsystem>