7 Replies Latest reply on Apr 13, 2005 10:10 AM by starksm64

    JMS 1.02b / 1.1  VerifyError?

    haussd

      Running Jboss 3.2.6. I recently had to convert my code to JMS 1.02b from JMS 1.1... I have a simple Queue that I am using to send messages. When the following line is executed:

      session.createReceiver(queue).setMessageListener(new MySenderMessageListener("Listener ONE", this));

      .. I get a VerifyError for my class implementing MessageListener. Error is:

      java.lang.VerifyError: (class: com/bobo/MySenderMessageListener, method: onMessage signature: (Ljavax/jms/Message;)V) Expecting to find object/array on stack

      My class (MySenderMessageListener): (code omitted, just to show my onMessage )..

      import javax.jms.MessageListener;
      import javax.jms.Message;
      ...

      public class MySenderMessageListener implements MessageListener
      {

      public MySenderMessageListener(String receiverName,
      MyThing thing)
      {
      ...
      }

      public void onMessage(javax.jms.Message message)
      {

      ...

      }

      }

      I checked all the jars in jboss/lib jboss/server/default/lib and my WEB-INF/lib and the only Message and MessageListeners in those paths come from jboss-j2ee.jar.

      Could I have some old JMS messages in queue somewhere that I need to flush?

        • 1. Re: JMS 1.02b / 1.1  VerifyError?
          starksm64

          There is no void onMessage(javax.jms.Message[] m) signature in any jms spec version so there has to be some bytecode manipulation to see this type of error.

          • 2. Re: JMS 1.02b / 1.1  VerifyError?
            peteclark3

            Ain't no one here doing any bytecode manipulation sir.

            • 3. Re: JMS 1.02b / 1.1  VerifyError?
              peteclark3

              Found the cause of the error, but not sure why it's complaining.

              When I remove code in onMessage that accesses a HashMap, it works fine. The HashMap is within the class that implements the MessageListener.

              Any clue why it would be complaining?

              • 4. Re: JMS 1.02b / 1.1  VerifyError?

                Moderated: What has not recompiling your classes correctly when you make changes
                got to do with JMS?

                • 5. Re: JMS 1.02b / 1.1  VerifyError?
                  peteclark3

                  I'm using eclipse, so you're saying eclipse is not compiling my classes correctly?

                  • 6. Re: JMS 1.02b / 1.1  VerifyError?
                    haussd

                    I'm using JDK 5.0.... All I know is when I start Jboss, if I have code that accesses a HashMap in my onMessage() implementing method of MessageListener, I get that VerifyError. When I take the code that does gets or puts on the HashMap (but leave the declaration and the new HashMap()), I don't get a VerifyError.

                    I don't see how I could be recompiling my classes incorrectly, I don't and have never seen this anywhere else using eclipse.

                    While your post "what has recompiling my classes incorrectly" was cute, it was very unhelpful. I POSTED a REPLY to see if doing something with a Map inside an onMessage was a bad thing..

                    So to answer your question, I have no clue what it has to do with JMS, but I only see this error, have only seen this error, with regard to my onMessage(javax.jms.Message) method, so I thought it might be somehow related to JMS.

                    • 7. Re: JMS 1.02b / 1.1  VerifyError?
                      starksm64

                      Post a bug report with an example so someone can look at.
                      http://jira.jboss.com/jira/browse/JBAS

                      Include the full jdk info and javac options used to compile. This simply looks to be a compiler bug, nothing to do with jboss.