Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-7044

NPE when browsing Messages

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 5.15.4
    • None
    • Broker
    • None

    Description

      Hi,

      we are using the HTTP connector of activeMQ. When browsing messages we can observe NullPointerExceptions.

      The exception occurs because XStream uses reflection to unmarshall objects. The exception can be reproduced with following test

        @Test
        public void testNPE() throws IOException {
          ActiveMQTextMessage message = new ActiveMQTextMessage();
      
          WireFormat wireFormat = new XStreamWireFormat();
      
          ByteSequence marshalled = wireFormat.marshal(message);
          Object unmarshalled = wireFormat.unmarshal(marshalled);
          ActiveMQTextMessage message2 = (ActiveMQTextMessage) unmarshalled;
          message2.canProcessAsExpired();
        }

      Attachments

        Activity

          People

            Unassigned Unassigned
            Andreas Schwarz Andreas Schwarz
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: