Assen Sharlandjiev created ARTEMIS-1998:
-------------------------------------------
Summary: NPE in MQTTProtocolManager.isClientConnected
Key: ARTEMIS-1998
URL: https://issues.apache.org/jira/browse/ARTEMIS-1998
Project: ActiveMQ Artemis
Issue Type: Bug
Components: MQTT
Affects Versions: 2.6.2, 2.4.0
Reporter: Assen Sharlandjiev
I've encountered the following unhandled null pointer exception
{code:java}
2018-05-24 07:02:52.632 WARN 5030 --- [mpl$5@7c3e4b1a)]
o.a.a.a.utils.actors.OrderedExecutor : null java.lang.NullPointerException:
null at
org.apache.activemq.artemis.core.protocol.mqtt.MQTTProtocolManager.isClientConnected(MQTTProtocolManager.java:182)
at
org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnectionManager.disconnect(MQTTConnectionManager.java:150)
at
org.apache.activemq.artemis.core.protocol.mqtt.MQTTFailureListener.connectionFailed(MQTTFailureListener.java:37)
at
org.apache.activemq.artemis.core.protocol.mqtt.MQTTConnection.fail(MQTTConnection.java:146)
at
org.apache.activemq.artemis.core.remoting.server.impl.RemotingServiceImpl$FailureCheckAndFlushThread$2.run(RemotingServiceImpl.java:734)
at
org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:42)
at
org.apache.activemq.artemis.utils.actors.OrderedExecutor.doTask(OrderedExecutor.java:31)
at
org.apache.activemq.artemis.utils.actors.ProcessorBase$ExecutorTask.run(ProcessorBase.java:53)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
Perhaps a null check should be added to the connectedClients.get(clientId).
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)