3 Replies Latest reply on Aug 20, 2013 5:40 AM by vartjboss

    Exception running queue example

      When I try running the queue example I get the following exception

      F:\jboss-messaging-1.4.5.GA\examples\queue>ant
      Buildfile: build.xml

      identify:
      [echo] ####################################################################
      #######
      [echo] # Running the QUEUE example
      #
      [echo] ####################################################################
      #######
      [echo] The queue: testQueue
      [echo] The client jar: ../..//jboss-messaging-client.jar

      sanity-check:

      init:

      compile:

      run:
      [java] Queue /queue/testQueue exists
      [java] org.jboss.jms.exception.MessagingJMSException: Failed to invoke
      [java] at org.jboss.jms.client.delegate.DelegateSupport.handleThrowable
      (DelegateSupport.java:271)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      .org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionD
      elegate$aop(ClientConnectionFactoryDelegate.java:198)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      $createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactor
      yDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.container.StateCreationAspect.handleCrea
      teConnectionDelegate(StateCreationAspect.java:80)
      [java] at org.jboss.aop.advice.org.jboss.jms.client.container.StateCrea
      tionAspect0.invoke(StateCreationAspect0.java)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      $createConnectionDelegate_N3019492359065420858.invokeNext(ClientConnectionFactor
      yDelegate$createConnectionDelegate_N3019492359065420858.java)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      .createConnectionDelegate(ClientConnectionFactoryDelegate.java)
      [java] at org.jboss.jms.client.JBossConnectionFactory.createConnectionI
      nternal(JBossConnectionFactory.java:205)
      [java] at org.jboss.jms.client.JBossConnectionFactory.createConnection(
      JBossConnectionFactory.java:87)
      [java] at org.jboss.jms.client.JBossConnectionFactory.createConnection(
      JBossConnectionFactory.java:82)
      [java] at org.jboss.example.jms.queue.QueueExample.example(QueueExample
      .java:72)
      [java] at org.jboss.example.jms.common.ExampleSupport.run(ExampleSuppor
      t.java:148)
      [java] at org.jboss.example.jms.queue.QueueExample.main(QueueExample.ja
      va:134)
      [java] Caused by: java.lang.NoSuchMethodError: org.jboss.remoting.Client.co
      nnect(Lorg/jboss/remoting/ConnectionListener;Ljava/util/Map;)V
      [java]
      [java] at org.jboss.jms.client.remoting.JMSRemotingConnection$1.run(JMS
      RemotingConnection.java:374)
      [java] Please verify if you have access to the server. If you are using JBo
      ssEAP maybe you don't have security access
      [java] at java.security.AccessController.doPrivileged(Native Method)
      [java] at org.jboss.jms.client.remoting.JMSRemotingConnection.start(JMS
      RemotingConnection.java:368)
      [java] at org.jboss.jms.client.delegate.ClientConnectionFactoryDelegate
      .org$jboss$jms$client$delegate$ClientConnectionFactoryDelegate$createConnectionD
      elegate$aop(ClientConnectionFactoryDelegate.java:165)
      [java] ... 11 more
      [java]
      [java] #####################
      [java] ### FAILURE! ###
      [java] #####################

      BUILD FAILED
      F:\jboss-messaging-1.4.5.GA\examples\queue\build.xml:79: Java returned: 1

        • 1. Re: Exception running queue example

          This problem apparently is caused by the use of the jar files from jboss-messaging 1.45. I went back to 1.42 and I no longer get the error and my program run farther. Though another exception occurs:

          javax.jms.JMSException: The consumer has a MessageListener set, cannot call receive(..)
          at org.jboss.jms.client.container.ClientConsumer.receive(ClientConsumer.java:490)
          at org.jboss.jms.client.container.ConsumerAspect.handleReceive(ConsumerAspect.java:194)
          at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect52.invoke(ConsumerAspect52.java)
          at org.jboss.jms.client.delegate.ClientConsumerDelegate$receive_N8299950230150603585.invokeNext(ClientConsumerDelegate$receive_N8299950230150603585.java)
          at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
          at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
          at org.jboss.jms.client.delegate.ClientConsumerDelegate$receive_N8299950230150603585.invokeNext(ClientConsumerDelegate$receive_N8299950230150603585.java)
          at org.jboss.jms.client.delegate.ClientConsumerDelegate.receive(ClientConsumerDelegate.java)
          at org.jboss.jms.client.JBossMessageConsumer.receive(JBossMessageConsumer.java:86)
          at com.gdit.listener.JMSExample.testMessage(JMSExample.java:49)
          at com.gdit.listener.JMSExample.main(JMSExample.java:20)

          • 2. Re: Exception running queue example
            gaohoward

            Make sure you have the correct version of remoting.

            H.

            • 3. Re: Exception running queue example
              vartjboss

              Hi Mike,

               

              Have you got solution for the problem ?? i am facing the same issue. Please let me know what you found out as a solution.


              Thanks,