You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Timothy Bish (JIRA)" <ji...@apache.org> on 2015/06/02 00:10:19 UTC
[jira] [Resolved] (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 ]
Timothy Bish resolved AMQ-5816.
-------------------------------
Resolution: Fixed
Fix Version/s: 5.12.0
Assignee: Timothy Bish
Patch applied, added a test to cover. Thanks!
> 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
> Assignee: Timothy Bish
> Fix For: 5.12.0
>
> Attachments: Exception, http-leveldb.patch
>
>
> 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)