You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "ASF subversion and git services (Jira)" <ji...@apache.org> on 2024/09/11 03:09:00 UTC
[jira] [Commented] (ARTEMIS-5033) Avoid NPE on method processAddSession in OpenWireConnection
[ https://issues.apache.org/jira/browse/ARTEMIS-5033?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17880839#comment-17880839 ]
ASF subversion and git services commented on ARTEMIS-5033:
----------------------------------------------------------
Commit 9702053af266d5a62e45081063d35871c0187c07 in activemq-artemis's branch refs/heads/main from Laurent Dauvilaire
[ https://gitbox.apache.org/repos/asf?p=activemq-artemis.git;h=9702053af2 ]
ARTEMIS-5033 Avoid NPE on method processAddSession in OpenWireConnection
The class org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection in ActiveMQ Artemis
is based on org.apache.activemq.broker.TransportConnection from ActiveMQ Classic,
and in the latter there is null check that doesn't exist in the former.
Therefore, I think it's worth adding this check.
The info should never be null since it is passed in off the wire from the OpenWire marshaller,
and state.getSessionIds() should also never return null because the underlying ConcurrentMap is initialized when ConnectionState is created.
> Avoid NPE on method processAddSession in OpenWireConnection
> -----------------------------------------------------------
>
> Key: ARTEMIS-5033
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5033
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Reporter: Justin Bertram
> Priority: Major
>
> Avoid a {{NullPointerException}} that can occur on OpenWire reconnections.
> Seen stack trace :
> {noformat}
> Errors occurred during the buffering operation : java.lang.NullPointerException
> at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection$CommandProcessor.processAddSession(OpenWireConnection.java:1491)
> at org.apache.activemq.command.SessionInfo.visit(SessionInfo.java:66)
> at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.act(OpenWireConnection.java:366)
> at org.apache.activemq.artemis.core.protocol.openwire.OpenWireConnection.bufferReceived(OpenWireConnection.java:309)
> at org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$DelegatingBufferHandler.bufferReceived(RemotingServiceImpl.java:723)
> at org.apache.activemq.artemis.core.remoting.impl.netty.ActiveMQChannelHandler.channelRead(ActiveMQChannelHandler.java:73)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
> at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
> at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475)
> at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1338)
> at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1387)
> at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:529)
> at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:468)
> at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
> at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412)
> at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440)
> at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420)
> at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919){noformat}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact