Error using HornetQ2.2.14 with Spring3.1
raymanf Jul 11, 2012 3:48 AMHi,
I am trying to create jmstemplate in my application and I get this error:
Jul 11, 2012 10:19:38 AM org.hornetq.core.logging.impl.JULLogDelegate warn WARNING: Unexpected Netty Version was expecting 3.2.5.Final-a96d88c using 3.2.0.BETA1-r2215 2012-07-11 10:19:38,912 com.finbird.fixgw.test.TriggerBean [ERROR] java.lang.NoSuchMethodError: org.hornetq.spi.core.remoting.ConnectionLifeCycleListener.connectionCreated(Lorg/hornetq/spi/core/remoting/Connection;Lorg/hornetq/spi/core/protocol/ProtocolType;)V java.lang.NoSuchMethodError: org.hornetq.spi.core.remoting.ConnectionLifeCycleListener.connectionCreated(Lorg/hornetq/spi/core/remoting/Connection;Lorg/hornetq/spi/core/protocol/ProtocolType;)V Jul 11, 2012 10:20:39 AM org.hornetq.core.logging.impl.JULLogDelegate warn WARNING: Connection failure has been detected: Did not receive data from /127.0.0.1:1036. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=3]
I made sure I have the jars with ths package but its still crushing.
this is the netty jar:
netty-3.2.3.Final.jar
and I am using HornetQ2.2.14 jars.
and this is my xml configuration:
<bean name="connectionFactory" class="org.hornetq.jms.client.HornetQJMSConnectionFactory"> <constructor-arg name="ha" value="false" /> <constructor-arg> <bean class="org.hornetq.api.core.TransportConfiguration"> <constructor-arg value="org.hornetq.integration.transports.netty.NettyConnectorFactory" /> <constructor-arg> <map key-type="java.lang.String" value-type="java.lang.Object"> <entry key="port" value="5445"></entry> </map> </constructor-arg> </bean> </constructor-arg> </bean> <bean id="queueOneTemplate" class="org.springframework.jms.core.JmsTemplate"> <property name="connectionFactory" ref="connectionFactory" /> <property name="defaultDestination" ref="feedDispatcherTopic" /> <property name="pubSubDomain" value="true" /> <property name="receiveTimeout" value="1000" /> </bean>
Java code:
public class MyMessageSender { @Autowired private JmsTemplate queueOneTemplate; // To Queue One public void pushToQueueOne() { queueOneTemplate.send(new MessageCreator() { public Message createMessage(Session session) throws JMSException { ObjectMessage msg = session.createObjectMessage(); String s = "test message"; msg.setObject(s); return msg; } }); }
}
Please if you have any idea?
thanks,
ray.