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

NPE during sending a message when using http transport and leveldb store

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.11.0, 5.11.1
    • 5.12.0
    • Broker, LevelDB
    • None
    • Patch Available

    Description

      It is impossible to use combination of HTTP transport with LevelDB as persistent store: when trying to send a persistent message the broker throws a NullPointerException (see attachment Exception).

      This happens because HTTP transport uses XStream library for deserealization, which follows Java Serialization rules. As a result, transient field dataLocator is null after deserialization. Later, LevelDB invokes getDataLocator, and that's when NPE is thrown.

      Proposed patch adds private method readResolve, which is invoked after deserialization, and which initializes dataLocator field.

      Attachments

        1. Exception
          3 kB
          Ievgen Tarasov
        2. http-leveldb.patch
          1 kB
          Ievgen Tarasov

        Activity

          People

            tabish Timothy A. Bish
            eugene.tarasov Ievgen Tarasov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: