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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.11.0, 5.11.1
    • Fix Version/s: 5.12.0
    • Labels:
      None
    • Patch Info:
      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

            • Assignee:
              tabish121 Timothy Bish
              Reporter:
              eugene.tarasov Ievgen Tarasov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: