2 Replies Latest reply on Aug 15, 2006 5:51 AM by hmr_mueller

    NoSuchMethodError when receiving from Queue with message sel

    Marian Noga Newbie

      I'm using JBoss 4.0.3 SP1 with JmsTemplate (SpringFramework 1.2.7)
      If i call JmsTemplate.receive(Destination, String messageSelector) i get
      following exception

      org.jboss.mq.SpyJMSException: Error during async delivery; - nested throwable: (java.lang.NoSuchMethodError: org.jboss.util.Primitives.valueOf(Z)Ljava/lang/Boolean;)
       at org.jboss.mq.SpyJMSException.getAsJMSException(SpyJMSException.java:66)
       at org.jboss.mq.Connection.asynchFailure(Connection.java:437)
       at org.jboss.mq.Connection.asynchDeliver(Connection.java:419)
       at org.jboss.mq.il.uil2.UILClientILService.handleMsg(UILClientILService.java:100)
       at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:369)
       at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
       at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:732)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.NoSuchMethodError: org.jboss.util.Primitives.valueOf(Z)Ljava/lang/Boolean;
       at org.jboss.mq.selectors.Operator.equal(Operator.java:201)
       at org.jboss.mq.selectors.Operator.apply(Operator.java:902)
       at org.jboss.mq.selectors.Selector.test(Selector.java:128)
       at org.jboss.mq.Subscription.accepts(Subscription.java:93)
       at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:157)
       at org.jboss.mq.Connection.asynchDeliver(Connection.java:414)
       ... 5 more


      on server and in client i use the same version of jbossall-client.jar
      i can see there is mentioned method in this library:
      Boolean org.jboss.util.Primitives.valueOf(boolean)

      the error won't occur if i call JmsTemplate.receive(Destination) method (without messageSelector).

        • 1. Re: NoSuchMethodError when receiving from Queue with message
          hmr_mueller Newbie

          We have exactly the same problem with JBoss 3.2.7, Java5 using Messaging without JMSTemplates of Spring.

          2006-08-13 21:08:24,716 TRACE [org.jboss.mq.il.uil2.SocketManager] sendMessage will throw error
          java.lang.reflect.UndeclaredThrowableException
           at org.jboss.mq.il.uil2.msgs.BaseMsg.setError(BaseMsg.java:301)
           at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:371)
           at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: java.lang.NoSuchMethodError: org.jboss.util.Primitives.valueOf(Z)Ljava/lang/Boolean;
           at org.jboss.mq.selectors.Operator.equal(Operator.java:201)
           at org.jboss.mq.selectors.Operator.apply(Operator.java:902)
           at org.jboss.mq.selectors.Selector.test(Selector.java:128)
           at org.jboss.mq.Subscription.accepts(Subscription.java:93)
           at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:156)
           at org.jboss.mq.Connection.asynchDeliver(Connection.java:409)
           at org.jboss.mq.il.uil2.UILClientILService.handleMsg(UILClientILService.java:94)
           at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:361)
           ... 3 more
          2006-08-13 21:08:24,716 TRACE [org.jboss.mq.server.ClientConsumer] Could not send messages to a receiver. It is closed.
          java.lang.reflect.UndeclaredThrowableException
           at org.jboss.mq.il.uil2.msgs.BaseMsg.setError(BaseMsg.java:301)
           at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:371)
           at org.jboss.mq.il.uil2.msgs.BaseMsg.run(BaseMsg.java:377)
           at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:748)
           at java.lang.Thread.run(Thread.java:595)
          Caused by: java.lang.NoSuchMethodError: org.jboss.util.Primitives.valueOf(Z)Ljava/lang/Boolean;
           at org.jboss.mq.selectors.Operator.equal(Operator.java:201)
           at org.jboss.mq.selectors.Operator.apply(Operator.java:902)
           at org.jboss.mq.selectors.Selector.test(Selector.java:128)
           at org.jboss.mq.Subscription.accepts(Subscription.java:93)
           at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:156)
           at org.jboss.mq.Connection.asynchDeliver(Connection.java:409)
           at org.jboss.mq.il.uil2.UILClientILService.handleMsg(UILClientILService.java:94)
           at org.jboss.mq.il.uil2.SocketManager$ReadTask.handleMsg(SocketManager.java:361)
           ... 3 more
          

          If messages which should be read are already on the queue everything works fine. But if the Receiver is started before the messages are on the queue we get the above error.
          The jboss-common.jar in the server and the jbossall-client.jar the client is using match.

          Can anyone assist?
          Thanks, Harald

          • 2. Re: NoSuchMethodError when receiving from Queue with message
            hmr_mueller Newbie

            The problem was a JBoss 3.2.3 lib in the Receiver classpath which had an incorrect version of the Primitives class. Removal of this library fixed the error.