1 Reply Latest reply on Aug 26, 2002 2:11 PM by Emily

    attempt to pop empty stack ignored

    Emily Newbie

      Hello,

      I have some code that adds messages to a JMS queue and my listener seems to be receiving them ok. However, when I look at the server log I am getting some warnings and exceptions:

      09:53:37,864 WARN [TCLStack] Attempt to pop empty stack ingored
      java.util.EmptyStackException
      at java.util.Stack.peek(Stack.java:79)
      at java.util.Stack.pop(Stack.java:61)
      at org.jboss.util.TCLStack.pop(TCLStack.java:96)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:696)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:980)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:238)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:561)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:377)
      at org.jboss.mq.SpySession.run(SpySession.java:252)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:642)
      at java.lang.Thread.run(Thread.java:536)

      09:53:37,874 ERROR [StdServerSession] failed to commit/rollback
      javax.transaction.xa.XAException
      at org.jboss.mq.SpyXAResource.commit(SpyXAResource.java:105)
      at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:289)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:561)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:377)
      at org.jboss.mq.SpySession.run(SpySession.java:252)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:177)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:642)
      at java.lang.Thread.run(Thread.java:536)


      Any ideas why I am getting this? I am using JBoss 3.0.0 and here are the relevant snippets of code:

      //add message to queue
      MapMessage msg = qSess.createMapMessage();
      msg.setInt("participantID", participantID);
      msg.setString("temporaryRepository", participantID + File.separator);
      msg.setJMSCorrelationID("UploadManager");
      qSender.send(msg, javax.jms.DeliveryMode.PERSISTENT,
      javax.jms.Message.DEFAULT_PRIORITY, 0 );


      AND

      //get message off of the queue
      public void onMessage(Message message) {
      if(! (message instanceof MapMessage)){
      System.err.println("wrong type of message received");
      return;
      }
      MapMessage msg = (MapMessage)message;
      System.err.println("Got Message: " + msg.toString());
      try{
      //all this stuff works
      }catch(JMSException e){
      e.printStackTrace(System.err);
      }
      }