NettyAcceptorFactory.createAcceptor error
niranjan.numeroeins May 17, 2017 4:23 AMI am trying to connect to HornetQconsumer from HornetQProducer.Doing it on local machine later reproduce the same on remote machines.
I am new to JMS i have some questions regarding HornetQ JMS implementation
1: Is it correct if i use two HornetQ servers ,one will work with Producer and remote server will work with Consumer.
2: can i use embedded configuration to achieve this or i am doing it wrong ,
3: Can i use the bridge configuration any side i want or it has to be on client side or server side.
if i am using all these things correctly then why am getting this error:
INFO: Connecting bridge my-bridge to its destination
Well, you seems to doing something wrong. Please check if config files are in your classes folder.
java.lang.AbstractMethodError: org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory.createAcceptor(Ljava/util/Map;Lorg/hornetq/spi/core/remoting/BufferHandler;Lorg/hornetq/spi/core/remoting/ConnectionLifeCycleListener;Ljava/util/concurrent/Executor;Ljava/util/concurrent/ScheduledExecutorService;)Lorg/hornetq/spi/core/remoting/Acceptor;
at org.hornetq.core.remoting.server.impl.RemotingServiceImpl.start(RemotingServiceImpl.java:162)
at org.hornetq.core.server.impl.HornetQServerImpl.start(HornetQServerImpl.java:306)
at org.hornetq.jms.server.impl.JMSServerManagerImpl.start(JMSServerManagerImpl.java:179)
at com.touchtech.EmbeddedServerDemoP.startServer(EmbeddedServerDemoP.java:37)
at com.touchtech.EmbeddedServerDemoP.main(EmbeddedServerDemoP.java:17)
May 17, 2017 12:51:59 AM org.hornetq.core.logging.impl.JULLogDelegate warn
WARNING: Bridge my-bridge is unable to connect to destination. It will be disabled.
HornetQException[errorCode=0 message=Failed to create session]
at org.hornetq.core.client.impl.FailoverManagerImpl.createSession(FailoverManagerImpl.java:455)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1063)
at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:790)
at org.hornetq.core.server.cluster.impl.BridgeImpl.createObjects(BridgeImpl.java:666)
at org.hornetq.core.server.cluster.impl.BridgeImpl.access$800(BridgeImpl.java:64)
at org.hornetq.core.server.cluster.impl.BridgeImpl$CreateObjectsRunnable.run(BridgeImpl.java:779)
at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:96)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NoSuchMethodError: org.hornetq.utils.HornetQThreadFactory.<init>(Ljava/lang/String;ZLjava/lang/ClassLoader;)V
at org.hornetq.core.remoting.impl.netty.NettyConnector.start(NettyConnector.java:413)
at org.hornetq.core.client.impl.FailoverManagerImpl.getConnection(FailoverManagerImpl.java:919)
at org.hornetq.core.client.impl.FailoverManagerImpl.getConnectionWithRetry(FailoverManagerImpl.java:802)
at org.hornetq.core.client.impl.FailoverManagerImpl.createSession(FailoverManagerImpl.java:332)
... 9 more
Lastly i was using above approach as this below dint work for me:
Please help , as i have read Chapter 36. Core Bridges but the bridge example works with servers server0 and server1 defined using some directory path in maven
<execution>
<id>start0</id>
<goals>
<goal>start</goal>
</goals>
<configuration>
<hornetqConfigurationDir>${basedir}/target/classes/hornetq/server0</hornetqConfigurationDir>
</configuration>
</execution>
how to change this configuration or simply how to detach the two configurations from one pom two two remote poms
-
HornetQHelloWorld_C.rar 36.3 KB
-
HornetQHelloWorld_P.rar 39.7 KB