You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Ievgen Tarasov (JIRA)" <ji...@apache.org> on 2015/06/01 14:43:17 UTC

[jira] [Updated] (AMQ-5816) NPE during sending a message when using http transport and leveldb store

     [ https://issues.apache.org/jira/browse/AMQ-5816?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ievgen Tarasov updated AMQ-5816:
--------------------------------
    Attachment: Exception

> NPE during sending a message when using http transport and leveldb store
> ------------------------------------------------------------------------
>
>                 Key: AMQ-5816
>                 URL: https://issues.apache.org/jira/browse/AMQ-5816
>             Project: ActiveMQ
>          Issue Type: Bug
>          Components: activemq-leveldb-store, Broker
>    Affects Versions: 5.11.0, 5.11.1
>            Reporter: Ievgen Tarasov
>         Attachments: Exception
>
>
> 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|https://github.com/apache/activemq/blob/activemq-5.11.1/activemq-client/src/main/java/org/apache/activemq/command/MessageId.java#L37] 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.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)