13 Replies Latest reply on Mar 27, 2007 4:55 AM by sabdulkareem

    Cannot configure JBOSS Messaging

    anshah1

      Hi all,

      I have tried again and again however I cannot seem to be able to configure JBOSS Messaging to work with my application.

      Firstly I have made sure that JBOSS messaging is working fine and tested it just as it is described in the docs.

      Now I have a server application that uses a MDB as such

      
      /**
       * @ejb.bean name="NCBIMessageDrivenBean"
       * destination-type="javax.jms.Queue"
       *
       * @jboss.destination-jndi-name name="queue/NCBIQueue"
       */
      public class NCBIMessageDrivenBean implements MessageDrivenBean, MessageListener {
      
      


      I am using Xdoclet to generate the supporting files. So I believe I have configured this bean to listen to the respective topic.

      Once the application ear file is deployed I can see messages of the form
      16:32:30,419 WARN [JMSContainerInvoker] Could not find the queue destination-jndi-name=queue/NCBIQueue
      16:32:30,419 WARN [JMSContainerInvoker] destination not found: queue/NCBIQueue reason: javax.naming.NameNotFoundException: NCBIQueue not bound
      16:32:30,419 WARN [JMSContainerInvoker] creating a new temporary destination: queue/NCBIQueue


      on the server.

      however immediately following that I get a

      16:32:30,434 WARN [JMSContainerInvoker] JMS provider failure detected:
      org.jboss.deployment.DeploymentException: Error during queue setup; - nested throwable: (javax.management.InstanceNotFoundException: jboss.mq:service=DestinationManager is not registered.)
       at org.jboss.deployment.DeploymentException.rethrowAsDeploymentException(DeploymentException.java:39)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:906)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:932)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:274)
       at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:230)
       at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
      


      and this is caused by
      Caused by: javax.management.InstanceNotFoundException: jboss.mq:service=DestinationManager is not registered.
       at org.jboss.mx.server.registry.BasicMBeanRegistry.get(BasicMBeanRegistry.java:508)
       at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:638)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.createDestination(JMSContainerInvoker.java:1201)
       at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerStartDelivery(JMSContainerInvoker.java:872)
       ... 109 more
      


      Am I missing something? Is there some more configuration step I need to do in order to get this all working?

      Thanks,
      Anuj


      [/url]

        • 1. Re: Cannot configure JBOSS Messaging
          timfox

          Hi Anuj-

          It looks like your xdoclet i generating jboss mq destination configuration.

          The configuration for jboss messaging is subtely different.

          An example jboss messaging queue configuration is:

          
          <?xml version="1.0" encoding="UTF-8"?>
           <server>
           <loader-repository>jboss.messaging:loader=ScopedLoaderRepository
           <loader-repository-config>java2ParentDelegation=false</loader-repository-config>
           </loader-repository>
           <mbean code="org.jboss.jms.server.destination.Queue"
           name="jboss.messaging.destination:service=Queue,name=myQueue"
           xmbean-dd="xmdesc/Queue-xmbean.xml">
           <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
           </mbean>
           </server>
          
          
          
          We need to update the docs ASAP to reflect this
          
          
          
          


          • 2. Re: Cannot configure JBOSS Messaging
            luc.texier
            • 3. Re: Cannot configure JBOSS Messaging
              luc.texier

              my bad, Tim is right. The current doco is incorrect.

              • 4. Re: Cannot configure JBOSS Messaging
                anshah1

                Hmm. So that problem is now fixed. I can see messages while my server is running that tell me that the deployment worked just fine. however here's an exception I get when I try to send a message to my queue.

                Firstly, I can see the following

                16:42:41,723 INFO [Queue] Queue[/queue/NCBIQueue] started, fullSize=75000, pageSize=2000, downCacheSize=1000
                


                So now I know that it's available. Here's my send message code
                InitialContext ic = null;
                 QueueConnectionFactory cf = null;
                 QueueConnection connection = null;
                 QueueConnection connection2 = null;
                
                 try {
                
                 ic = new InitialContext();
                
                 cf = (QueueConnectionFactory)ic.lookup("/ConnectionFactory");
                 Queue queue = (Queue)ic.lookup("queue/NCBIQueue");
                 System.out.println("Queue " + queue + " exists");
                
                 connection = cf.createQueueConnection();
                 QueueSession session = connection.createQueueSession(false, Session.AUTO_ACKNOWLEDGE);
                 QueueSender sender = session.createSender(queue);
                
                 TextMessage message = session.createTextMessage("Hello!");
                 System.out.println("In sendMessage()");
                 sender.send(message);
                
                 }catch(NamingException ne){
                 ne.printStackTrace();
                
                 }catch(JMSException jmse){
                 jmse.printStackTrace();
                
                 }catch(Exception e){
                 e.printStackTrace();
                
                 }finally{
                
                 if(ic != null) {
                 try {
                 connection.close();
                 ic.close();
                 }catch(Exception ignore){ }
                 }
                
                 }


                however this throws the following exception

                java.lang.IllegalStateException: Unable to resolve MethodInvocation advice org.jboss.jms.server.container.SecurityAspect.handleSend
                 at org.jboss.aop.advice.AbstractAdvice.resolveAdvice(AbstractAdvice.java:228)
                 at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:125)
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:719)
                 at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:99)
                 at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
                 at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:831)
                 at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:72)
                 at org.jboss.remoting.Client.invoke(Client.java:527)
                 at org.jboss.remoting.Client.invoke(Client.java:490)
                 at org.jboss.jms.client.delegate.DelegateSupport.invoke(DelegateSupport.java:112)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.TransactionAspect.handleSend(TransactionAspect.java:151)
                 at org.jboss.aop.advice.org.jboss.jms.client.container.TransactionAspect11.invoke(TransactionAspect11.java)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:130)
                 at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
                 at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:238)
                 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:585)
                 at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:130)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:130)
                 at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:208)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
                 at gov.pnl.brm.server.sessionbeans.query.QuerySessionBean.sendMessage(QuerySessionBean.java:233)
                 at gov.pnl.brm.server.sessionbeans.query.QuerySessionBean.setCachedDataSet(QuerySessionBean.java:194)
                 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:585)
                 at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
                 at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
                 at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
                 at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
                 at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
                 at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
                 at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
                 at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
                 at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
                 at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
                 at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
                 at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                 at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
                 at org.jboss.ejb.Container.invoke(Container.java:873)
                 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:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
                 at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
                 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:585)
                 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
                 at sun.rmi.transport.Transport$1.run(Transport.java:153)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
                 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                 at java.lang.Thread.run(Thread.java:595)
                16:43:20,499 ERROR [ExceptionInterceptor] Linked exception is:
                java.lang.IllegalStateException: Unable to resolve MethodInvocation advice org.jboss.jms.server.container.SecurityAspect.handleSend
                 at org.jboss.aop.advice.AbstractAdvice.resolveAdvice(AbstractAdvice.java:228)
                 at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:125)
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 at org.jboss.jms.server.container.ServerLogInterceptor.invoke(ServerLogInterceptor.java:105)
                 at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
                 at org.jboss.aop.Advisor.dynamicInvoke(Advisor.java:719)
                 at org.jboss.aop.Dispatcher.invoke(Dispatcher.java:99)
                 at org.jboss.jms.server.remoting.JMSServerInvocationHandler.invoke(JMSServerInvocationHandler.java:126)
                 at org.jboss.remoting.ServerInvoker.invoke(ServerInvoker.java:831)
                 at org.jboss.remoting.transport.local.LocalClientInvoker.invoke(LocalClientInvoker.java:72)
                 at org.jboss.remoting.Client.invoke(Client.java:527)
                 at org.jboss.remoting.Client.invoke(Client.java:490)
                 at org.jboss.jms.client.delegate.DelegateSupport.invoke(DelegateSupport.java:112)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.TransactionAspect.handleSend(TransactionAspect.java:151)
                 at org.jboss.aop.advice.org.jboss.jms.client.container.TransactionAspect11.invoke(TransactionAspect11.java)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:130)
                 at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                 at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
                 at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:238)
                 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:585)
                 at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:130)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:130)
                 at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                 at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:208)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
                 at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
                 at gov.pnl.brm.server.sessionbeans.query.QuerySessionBean.sendMessage(QuerySessionBean.java:233)
                 at gov.pnl.brm.server.sessionbeans.query.QuerySessionBean.setCachedDataSet(QuerySessionBean.java:194)
                 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:585)
                 at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
                 at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
                 at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
                 at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
                 at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
                 at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
                 at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
                 at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
                 at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
                 at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
                 at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
                 at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                 at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
                 at org.jboss.ejb.Container.invoke(Container.java:873)
                 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:585)
                 at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                 at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                 at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                 at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                 at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                 at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
                 at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
                 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:585)
                 at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
                 at sun.rmi.transport.Transport$1.run(Transport.java:153)
                 at java.security.AccessController.doPrivileged(Native Method)
                 at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
                 at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                 at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                 at java.lang.Thread.run(Thread.java:595)
                16:43:20,515 INFO [STDOUT] javax.jms.IllegalStateException: Unable to resolve MethodInvocation advice org.jboss.jms.server.container.SecurityAspect.handleSend
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:91)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientSessionDelegate$send_N3028277934545793941.invokeNext(ClientSessionDelegate$send_N3028277934545793941.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientSessionDelegate.send(ClientSessionDelegate.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.container.ProducerAspect.handleSend(ProducerAspect.java:238)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                16:43:20,515 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                16:43:20,515 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
                16:43:20,515 INFO [STDOUT] at org.jboss.aop.advice.PerInstanceAdvice.invoke(PerInstanceAdvice.java:130)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:130)
                16:43:20,515 INFO [STDOUT] at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:117)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.container.ExceptionInterceptor.invoke(ExceptionInterceptor.java:69)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.container.ClientLogInterceptor.invoke(ClientLogInterceptor.java:107)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientProducerDelegate$send_3961598017717988886.invokeNext(ClientProducerDelegate$send_3961598017717988886.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.delegate.ClientProducerDelegate.send(ClientProducerDelegate.java)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:164)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:208)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:145)
                16:43:20,515 INFO [STDOUT] at org.jboss.jms.client.JBossMessageProducer.send(JBossMessageProducer.java:136)
                16:43:20,515 INFO [STDOUT] at gov.pnl.brm.server.sessionbeans.query.QuerySessionBean.sendMessage(QuerySessionBean.java:233)
                16:43:20,515 INFO [STDOUT] at gov.pnl.brm.server.sessionbeans.query.QuerySessionBean.setCachedDataSet(QuerySessionBean.java:194)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                16:43:20,515 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                16:43:20,515 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
                16:43:20,515 INFO [STDOUT] at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
                16:43:20,515 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
                16:43:20,515 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
                16:43:20,515 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:873)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                16:43:20,515 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                16:43:20,515 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
                16:43:20,515 INFO [STDOUT] at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
                16:43:20,515 INFO [STDOUT] at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
                16:43:20,515 INFO [STDOUT] at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
                16:43:20,515 INFO [STDOUT] at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:245)
                16:43:20,515 INFO [STDOUT] at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644)
                16:43:20,515 INFO [STDOUT] at org.jboss.invocation.jrmp.server.JRMPInvoker$MBeanServerAction.invoke(JRMPInvoker.java:805)
                16:43:20,515 INFO [STDOUT] at org.jboss.invocation.jrmp.server.JRMPInvoker.invoke(JRMPInvoker.java:406)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                16:43:20,515 INFO [STDOUT] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
                16:43:20,515 INFO [STDOUT] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
                16:43:20,515 INFO [STDOUT] at java.lang.reflect.Method.invoke(Method.java:585)
                16:43:20,515 INFO [STDOUT] at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:294)
                16:43:20,515 INFO [STDOUT] at sun.rmi.transport.Transport$1.run(Transport.java:153)
                16:43:20,515 INFO [STDOUT] at java.security.AccessController.doPrivileged(Native Method)
                16:43:20,515 INFO [STDOUT] at sun.rmi.transport.Transport.serviceCall(Transport.java:149)
                16:43:20,515 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:460)
                16:43:20,515 INFO [STDOUT] at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:701)
                16:43:20,515 INFO [STDOUT] at java.lang.Thread.run(Thread.java:595)
                



                Any ideas as to what is causing this?


                thanks,
                Anuj


                • 5. Re: Cannot configure JBOSS Messaging
                  ovidiu.feodorov

                  How does your client classpath look like?
                  Are you using the jboss-messaging-client.jar that comes with the release?

                  • 6. Re: Cannot configure JBOSS Messaging
                    anshah1

                    Yes,

                    So presently I am in the test phase and am trying to send a message from a SLSB to the queue. I have my jboss-messaging-client-scoped.jar file in the lib directory for my jboss messaging configuration ($JBOSS_HOME/server/messaging/lib).

                    Is there any other jar file that I would need?

                    Thanks
                    Anuj

                    • 7. Re: Cannot configure JBOSS Messaging
                      timfox

                      Anuj-

                      Can you remove the jboss-messaging-client-scoped.jar from your lib directory?

                      The client jar is only intended for use when calling JBossMessaging from an external client.

                      • 8. Re: Cannot configure JBOSS Messaging
                        anshah1

                        Well if I remove that jar file then I run into other class not found problems..

                        here's what I got

                        11:45:48,439 INFO [STDOUT] Queue JBossQueue[NCBIQueue] exists
                        11:45:50,392 INFO [STDOUT] In sendMessage()
                        11:45:50,392 ERROR [ExceptionInterceptor] Caught RuntimeException
                        java.lang.RuntimeException: java.lang.ClassNotFoundException: No ClassLoaders found for: org.jboss.jms.server.container.SecurityAspect
                         at org.jboss.aop.advice.GenericAspectFactory.getClazz(GenericAspectFactory.java:141)
                         at org.jboss.aop.advice.GenericAspectFactory.createPerInstance(GenericAspectFactory.java:182)
                         at org.jboss.aop.InstanceAdvisorDelegate.initializeAspects(InstanceAdvisorDelegate.java:80)
                         at org.jboss.aop.InstanceAdvisorDelegate.<init>(InstanceAdvisorDelegate.java:58)
                         at org.jboss.aop.ClassInstanceAdvisor.<init>(ClassInstanceAdvisor.java:72)
                         at org.jboss.jms.server.endpoint.advised.SessionAdvised._getInstanceAdvisor(SessionAdvised.java)


                        Once I put the jar file in there, all class not found errors do disappear for sure.


                        Thanks,
                        anuj


                        • 9. Re: Cannot configure JBOSS Messaging
                          timfox

                          Can you explain exactly what installation procedure you have followed and which jars/sars you have placed where.

                          • 10. Re: Cannot configure JBOSS Messaging
                            anshah1

                            So here's a step by step

                            1) Installed Jboss 4.0.3SP1 on my local C: (Windows)
                            2) Test Server installation .. Works fine. Shutdown server.
                            3) Download JBOSS Messaging and follow the automatic configuration step
                            from the user manual
                            4) Ran one of your samples from the user manual and got SUCCESS there.
                            5) put the following xml file ( messaging-service.xml ) in C:\jboss-4.0.3SP1\server\messaging\deploy


                            <?xml version="1.0" encoding="UTF-8" ?>
                            - <server>
                            - <loader-repository>
                             jboss.messaging:loader=ScopedLoaderRepository
                             <loader-repository-config>java2ParentDelagation=false</loader-repository-config>
                             </loader-repository>
                            - <mbean code="org.jboss.jms.server.destination.Queue" name="jboss.messaging.destination:service=Queue,name=NCBIQueue" xmbean-dd="xmdesc/Queue-xmbean.xml">
                             <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
                             </mbean>
                             </server>


                            6) Start the server with run -c messaging > debug.txt
                            7) Try to send a message to this queue using the client code posted before
                            8) So once I do that I got a ClassNotFoundException on one of the jboss server files and hence I had to put the jboss messaging jar file in there.


                            In my deploy directory (messaging configuration) I have a directory C:\jboss-4.0.3SP1\server\messaging\deploy\jboss-messaging.sar.

                            does that help you identify what might be wrong?

                            Thanks for your time,
                            Anuj





                            • 11. Re: Cannot configure JBOSS Messaging
                              anshah1

                              Seems to be working now, I had a problem with my EJB that was listening to the queue. Once that was deployed correctly, I could send a message and recieve one too.

                              Thanks for all your time.
                              Anuj

                              • 12. Re: Cannot configure JBOSS Messaging
                                ovidiu.feodorov

                                I'm glad it works. Thanks for trying Messaging.

                                • 13. Re: Cannot configure JBOSS Messaging
                                  sabdulkareem

                                  Can anyone please explain the steps to install JBOSS MQ on JBOSS 4.0.5?

                                  Thanks