This content has been marked as final.
Show 3 replies
-
1. Re: HornetQ error - Unable to connect to server using configuration InVMConnectorFactory
ataylor Mar 16, 2012 6:09 AM (in response to cegparamesh)theres not really enough info for us to help you, core config, client app, topology etc etc
-
2. Re: HornetQ error - Unable to connect to server using configuration InVMConnectorFactory
cegparamesh Mar 16, 2012 10:41 AM (in response to ataylor)Thanks Andy. Here are some additional info:
For testing the connectivity, I wrote a sample JSP with the following code:
Hashtable environment =new Hashtable(); environment.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory"); environment.put("java.naming.factory.url.pkgs", "org.jboss.naming:org.jnp.interfaces"); Context jndiContext = new InitialContext(environment); QueueConnectionFactory queueConnectionFactory = (QueueConnectionFactory) jndiContext.lookup("java:/ConnectionFactory"); javax.jms.Queue myQueue = (javax.jms.Queue) jndiContext.lookup("queue/myQueue");
Here is my hornetq configuration :
<connectors> <connector name="netty"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="${hornetq.remoting.netty.port:9505}"/> </connector> <connector name="netty-throughput"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyConnectorFactory</factory-class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="${hornetq.remoting.netty.batch.port:5555}"/> <param key="batch-delay" value="50"/> </connector> <connector name="in-vm"> <factory-class>org.hornetq.core.remoting.impl.invm.InVMConnectorFactory</factory-class> <param key="server-id" value="${hornetq.server-id:0}"/> </connector> </connectors> <acceptors> <acceptor name="netty"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="${hornetq.remoting.netty.port:9505}"/> </acceptor> <acceptor name="netty-throughput"> <factory-class>org.hornetq.core.remoting.impl.netty.NettyAcceptorFactory</factory-class> <param key="host" value="${jboss.bind.address:localhost}"/> <param key="port" value="${hornetq.remoting.netty.batch.port:5555}"/> <param key="batch-delay" value="50"/> <param key="direct-deliver" value="false"/> </acceptor> <acceptor name="in-vm"> <factory-class>org.hornetq.core.remoting.impl.invm.InVMAcceptorFactory</factory-class> <param key="server-id" value="0"/> </acceptor> </acceptors>
I'm testing this in my local computer, through localhost. There is no clustering.
-
3. Re: HornetQ error - Unable to connect to server using configuration InVMConnectorFactory
cegparamesh Mar 19, 2012 10:56 AM (in response to cegparamesh)Ok, This seems to be a jar version issue.
My war file contained the same version of HornetQ JAR files (2.1.2 Final), but somehow there was a mismatch between the installed version in JBoss.
So I removed all the hornetq related JAR files from my WAR and redeployed the application. It worked.