[
https://issues.apache.org/jira/browse/ARTEMIS-1105?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15962712#comment-15962712
]
Andy Taylor commented on ARTEMIS-1105:
--------------------------------------
The following patch seems to fix it I think, but not sure of what the logic
should be
Index:
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagedMessageImpl.java
<+>UTF-8
===================================================================
---
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagedMessageImpl.java
(date 1491597383000)
+++
artemis-server/src/main/java/org/apache/activemq/artemis/core/paging/impl/PagedMessageImpl.java
(revision )
@@ -73,8 +73,8 @@
LargeServerMessage lgMessage = storage.createLargeMessage();
ActiveMQBuffer buffer =
ActiveMQBuffers.wrappedBuffer(largeMessageLazyData);
- LargeMessagePersister.getInstance().decode(buffer, lgMessage);
- ((LargeServerMessage) message).incrementDelayDeletionCount();
+ lgMessage = LargeMessagePersister.getInstance().decode(buffer,
lgMessage);
+ lgMessage.incrementDelayDeletionCount();
this.message = lgMessage;
largeMessageLazyData = null;
}
> Null pointer when replicating paged messages
> --------------------------------------------
>
> Key: ARTEMIS-1105
> URL: https://issues.apache.org/jira/browse/ARTEMIS-1105
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Andy Taylor
> Assignee: Andy Taylor
>
> Ive seen the following stack trace when replicating:
> 09:30:12,288 WARN [org.apache.activemq.artemis.core.server] (Thread-1
> (ActiveMQ-client-netty-threads-303929810)) AMQ222086: error handling packet
> PACKET(ReplicationPageWriteMessage)[type=97, channelID=2,
> packetObject=ReplicationPageWriteMessage] for replication:
> java.lang.NullPointerException
> at
> org.apache.activemq.artemis.core.paging.impl.PagedMessageImpl.initMessage(PagedMessageImpl.java:77)
> [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.replication.ReplicationEndpoint.handlePageWrite(ReplicationEndpoint.java:654)
> [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.replication.ReplicationEndpoint.handlePacket(ReplicationEndpoint.java:186)
> [artemis-server-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl.handlePacket(ChannelImpl.java:628)
> [artemis-core-client-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.doBufferReceived(RemotingConnectionImpl.java:381)
> [artemis-core-client-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.protocol.core.impl.RemotingConnectionImpl.bufferReceived(RemotingConnectionImpl.java:363)
> [artemis-core-client-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.client.impl.ClientSessionFactoryImpl$DelegatingBufferHandler.bufferReceived(ClientSessionFactoryImpl.java:1143)
> [artemis-core-client-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:69)
> [artemis-core-client-2.1.0-SNAPSHOT.jar:2.1.0-SNAPSHOT]
> at
> io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:372)
> [netty-all-4.1.5.Final.jar:4.1.5.Final]
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)