1 Reply Latest reply on Nov 23, 2011 8:23 AM by ataylor

    Invoking Netty Connector from war file

    sureshtechspot

      Hi I am creating a war file which can act as jms queue service by using hornetq REST,

       

      So the steps I followed ,

       

      1. I have added the following dependencies in my pom.xml

       

      hornetq-core - 2.1.1.Final

      hornetq-jms - 2.1.1.Final

      jboss-jms-api_1.1_spec - 1.0.0.Beta1

      hornetq-rest - 1.0-beta-1

      resteasy-jaxrs - 2.0.0.GA

      resteasy-jaxb-provider - 2.0.0.GA

      netty - 3.2.5.Final

       

      2. And I added following hornetq files in my src/mail/resources

       

      hornetq-configuration.xml

      hornetq-jms.xml    - I have configured one queue , one Netty acceptor and one Netty connector

       

      hornetq-users.xml

      hornetq-config.xml ( the config file to give in the context-param)

       

      3. I deployed and if I am accesing from the browser with the below url,

       

                my.server.com/queues/jms.queue.myQueue

       

      then I am getting below error. According to my configuration it should invoke Netty connector but it is invoking invm-InVMConnectorFactory.

       

       

      HornetQException[errorCode=2 message=Unable to connect to server using configuration org-hornetq-core-remoting-impl-invm-InVMConnectorFactory?server-id=0]

      org.hornetq.core.client.impl.FailoverManagerImpl.createSession(FailoverManagerImpl.java:376)

      org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:1123)

      org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:887)

      org.hornetq.rest.queue.QueueDestinationsResource.findQueue(QueueDestinationsResource.java:147)

      sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

      sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)

      sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)

      java.lang.reflect.Method.invoke(Method.java:597)

      org.jboss.resteasy.core.ResourceLocator.createResource(ResourceLocator.java:65)

      org.jboss.resteasy.core.ResourceLocator.createResource(ResourceLocator.java:54)

      org.jboss.resteasy.core.ResourceLocator.invoke(ResourceLocator.java:91)

      org.jboss.resteasy.core.SynchronousDispatcher.getResponse(SynchronousDispatcher.java:506)

      org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:483)

      org.jboss.resteasy.core.SynchronousDispatcher.invokePropagateNotFound(SynchronousDispatcher.java:140)

      org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:204)

      org.jboss.resteasy.plugins.server.servlet.FilterDispatcher.doFilter(FilterDispatcher.java:59)

      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

       

       

      Any body have any idea?