5 Replies Latest reply on Jan 8, 2012 8:00 PM by ale2011

    How to config the queue name

    ale2011

      Hello,

       

      I've been trying to deploy a service with 2 queues: GetForecastRequestQueue and GetForecastResponseQueue. But I'm lost now and I'd really appreciate if someone could help me out with this problem.

       

      I have JBOSS AS 6 , with ActiveMQ integrated. (I've removed the HornetQ because I'll be using activemq instead of it).

       

      I created 2 queues in the activemq-jms-ds.xml . I basically copied and pasted the inbound queue that was originally there, and replace the name.

       

       .....
         <mbean code="org.jboss.resource.deployment.AdminObject" name="activemq.queue:name=GetForecastRequestQueue">
            <attribute name="JNDIName">activemq/queue/GetForecastRequestQueue</attribute>
           <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra.rar'</depends>
            <attribute name="Type">javax.jms.Queue</attribute>
            <attribute name="Properties">PhysicalName=GetForecastRequestQueue</attribute>
         </mbean>
      
         <mbean code="org.jboss.resource.deployment.AdminObject" name="activemq.queue:name=GetForecastResponseQueue">
            <attribute name="JNDIName">activemq/queue/GetForecastResponseQueue</attribute>
           <depends optional-attribute-name="RARName">jboss.jca:service=RARDeployment,name='activemq-ra.rar'</depends>
            <attribute name="Type">javax.jms.Queue</attribute>
            <attribute name="Properties">PhysicalName=GetForecastResponseQueue</attribute>
         </mbean> 
      .....
      

       

      In my .war file, I have the wsdl and cxf.xml file that contain information about the queue as follow:

       

      cxf.xml

       

      .... 
      <jms:conduit name="{http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImplPort.jms-conduit">
           <jms:address destinationStyle="queue" 
                  jndiConnectionFactoryName="java:activemq/QueueConnectionFactory"
                   jndiDestinationName="activemq/queue/GetForecastRequestQueue"
                   jndiReplyDestinationName="activemq/queue/GetForecastResponseQueue">
            <jms:JMSNamingProperty name="java.naming.factory.initial" 
                                   value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" />
           <jms:JMSNamingProperty name="java.naming.provider.url" 
                                   value="tcp://192.168.10.64:61616" />
           </jms:address>
       </jms:conduit>
      
       <jms:destination name="{http://soapjms.rd.nsrr.swim.faa.gov/}SoapJmsWeatherImplPort.jms-destination">
           <jms:address destinationStyle="queue" 
                  jndiConnectionFactoryName="java:activemq/QueueConnectionFactory" 
                  jndiDestinationName="activemq/queue/GetForecastResponseQueue"
                   jndiReplyDestinationName="activemq/queue/GetForecastResponseQueue">    
           <jms:JMSNamingProperty name="java.naming.factory.initial" 
                                   value="org.apache.activemq.jndi.ActiveMQInitialContextFactory" />
           <jms:JMSNamingProperty name="java.naming.provider.url" 
                                   value="tcp://192.168.10.64:61616" />
           </jms:address>
       </jms:destination>
       ...
      

       

      soapjmsweatherforecast.wsdl

       

      ...
      <wsdl:service>
      ... 
        <wsdl:port name="SoapJmsWeatherImplPort" binding="tns:SoapJmsWeatherImplServiceSoapBinding">
            <soap:address location= "jms:queue:GetForecastRequestQueue?replyToName=GetForecastResponseQueue"/>    
          </wsdl:port>    
        </wsdl:service>
      ...
      

       

      When I deployed this service, I get this error

       

      DEPLOYMENTS IN ERROR:
        Deployment "vfs:///C:/jboss/jboss-6.0.0.Final/server/default/deploy/SoapJmsWeatherForecast.war" is in error due to the following reason(s):
       javax.naming.NameNotFoundException: activemq/queue/GetForecastResponseQueue
      

       

       

      I don't understand why I got that error. The log shows that the queue bound at that address "activemq/queue/GetForecastResponseQueue" so how come it did not regconize the queue when I deployed it? I've tried just the queue name "GetForecastRequestQueue" and it also did not work.

       

      I looked at the Global JNDI namespace, it shows the 2 queues are under activemq/queue/ ..

       +- activemq (class: org.jnp.interfaces.NamingContext)
        |   +- queue (class: org.jnp.interfaces.NamingContext)
        |   |   +- GetForecastRequestQueue (class: org.apache.activemq.command.ActiveMQQueue)
        |   |   +- GetForecastResponseQueue (class: org.apache.activemq.command.ActiveMQQueue)
        +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo.HiLoKeyGeneratorFactory)

       

      What should I do to get to those 2 queues? Thanks a lot.

        • 1. Re: How to config the queue name
          jaikiran

          Are you sure the lookup is happening after the queues have been deployed?

          • 2. Re: How to config the queue name
            ale2011

            Yes, I'm sure that the queues have been deployed before the lookup. I deployed JBoss first to have the queues ready, then hot deployed my WAR file. And it was just unable to find those queues.

            • 3. Re: How to config the queue name
              jaikiran

              Please post the entire exception stacktrace.

              • 4. Re: How to config the queue name
                ale2011

                Here is the full error stacktrace

                 

                java.lang.RuntimeException: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

                 

                *** DEPLOYMENTS IN ERROR: Name -> Error

                 

                vfs:///Users/AshleyLe/Work/jboss-6.0.0.Final/server/default/deploy/SoapJmsWeatherForecast.war -> org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///Users/AshleyLe/Work/jboss-6.0.0.Final/server/default/deploy/SoapJmsWeatherForecast.war

                   

                DEPLOYMENTS IN ERROR:

                  Deployment "vfs:///Users/AshleyLe/Work/jboss-6.0.0.Final/server/default/deploy/SoapJmsWeatherForecast.war" is in error due to the following reason(s): javax.naming.NameNotFoundException: activemq/queue/GetForecastRequestQueue

                 

                        at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:320)

                        at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.start(StreamingDeploymentTarget.java:197)

                        at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.start(DeploymentProgressImpl.java:232)

                        at org.jboss.profileservice.management.client.upload.DeploymentProgressImpl.run(DeploymentProgressImpl.java:89)

                        at org.rhq.plugins.jbossas5.util.DeploymentUtils.run(DeploymentUtils.java:155)

                        at org.rhq.plugins.jbossas5.AbstractManagedDeploymentComponent.invokeOperation(AbstractManagedDeploymentComponent.java:162)

                        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

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

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

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

                        at org.rhq.core.pc.inventory.ResourceContainer$ComponentInvocationThread.call(ResourceContainer.java:525)

                        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)

                        at java.util.concurrent.FutureTask.run(FutureTask.java:138)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                        at java.lang.Thread.run(Thread.java:680)

                Caused by: org.jboss.deployers.client.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):

                 

                *** DEPLOYMENTS IN ERROR: Name -> Error

                 

                vfs:///Users/AshleyLe/Work/jboss-6.0.0.Final/server/default/deploy/SoapJmsWeatherForecast.war -> org.jboss.deployers.spi.DeploymentException: Error during deploy: vfs:///Users/AshleyLe/Work/jboss-6.0.0.Final/server/default/deploy/SoapJmsWeatherForecast.war

                   

                DEPLOYMENTS IN ERROR:

                  Deployment "vfs:///Users/AshleyLe/Work/jboss-6.0.0.Final/server/default/deploy/SoapJmsWeatherForecast.war" is in error due to the following reason(s): javax.naming.NameNotFoundException: activemq/queue/GetForecastRequestQueue

                 

                        at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1370)

                        at org.jboss.deployers.plugins.deployers.DeployersImpl.checkComplete(DeployersImpl.java:1316)

                        at org.jboss.deployers.plugins.main.MainDeployerImpl.checkComplete(MainDeployerImpl.java:968)

                        at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.checkComplete(MainDeployerPlugin.java:82)

                        at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.checkComplete(ProfileControllerContext.java:138)

                        at org.jboss.profileservice.plugins.deploy.actions.DeploymentStartAction.doPrepare(DeploymentStartAction.java:104)

                        at org.jboss.profileservice.management.actions.AbstractTwoPhaseModificationAction.prepare(AbstractTwoPhaseModificationAction.java:101)

                        at org.jboss.profileservice.management.ModificationSession.prepare(ModificationSession.java:87)

                        at org.jboss.profileservice.management.AbstractActionController.internalPerfom(AbstractActionController.java:234)

                        at org.jboss.profileservice.management.AbstractActionController.performWrite(AbstractActionController.java:213)

                        at org.jboss.profileservice.management.AbstractActionController.perform(AbstractActionController.java:150)

                        at org.jboss.profileservice.plugins.deploy.AbstractDeployHandler.startDeployments(AbstractDeployHandler.java:168)

                        at org.jboss.profileservice.management.upload.remoting.DeployHandlerDelegate.startDeployments(DeployHandlerDelegate.java:74)

                        at org.jboss.profileservice.management.upload.remoting.DeployHandler.invoke(DeployHandler.java:156)

                        at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:898)

                        at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:106)

                        at org.jboss.remoting.Client.invoke(Client.java:1961)

                        at org.jboss.remoting.Client.invoke(Client.java:804)

                        at org.jboss.profileservice.management.client.upload.StreamingDeploymentTarget.invoke(StreamingDeploymentTarget.java:312)

                        ... 15 more

                • 5. Re: How to config the queue name
                  ale2011

                  I was able to get it to work with the help of my co-worker.

                   

                  The problem was that the connection factory and the queues weren't in the same namespace. I had the connection factory under Java namespace, and the queues were under global namespace. As soon as we moved the queues to the Java namespace, it all worked out.