activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Reinhold <brianreinh...@lampreynetworks.com>
Subject Apollo MQTT server throws a null pointer exception on disconnect
Date Sat, 30 Nov 2013 00:45:24 GMT
I have established a connection to an embedded running of the MQTT server and
am able to publish and subscribe to messages from the remote client side.
However, when I invoke an MqttClient.disconnect() from the client side
(using the paho MqttClient) I get the following message from the MQTT server

Exception in thread "hawtdispatch-DEFAULT-3" java.lang.NullPointerException
	at
org.apache.activemq.apollo.mqtt.MqttSession$18$1.run(MqttSession.java:636)
	at
org.fusesource.hawtdispatch.internal.SerialDispatchQueue.run(SerialDispatchQueue.java:100)
	at
org.fusesource.hawtdispatch.internal.pool.SimpleThread.run(SimpleThread.java:77)

If I simply terminate the client application I get no such message.

The setup of the client side connection is as follows:
                mqttServerUrl = "ssl://localhost:8445";
                mqttClient = new APSMqttClient(mqttServerUrl,
aps.getClientId(), "./AhdMqttPersistentData");
               
mqttClient.setConnectionUserNameAndPassword(aps.getClientId(),
aps.getAHDCredential());
                mqttClient.SetCallback(new AhdMqttCallback());

                // This sets the WILL parameters to send "LOST" on the
payload, QoS = 2, retain message,
                // no clean session, topic is a status message. Publishing
on the topic in the code works okay.
                mqttClient.setConnectionQos(2,
aps.generateStatusTopicString());
                mqttClient.setConnectionKeepAliveTime(20); // seconds
                mqttClient.setConnectionTLS(new
HttpRest().getSSLSocketFactory());
                if(mqttClient.connect())

Has anyone had problems with the disconnect() of the MQTT server?



--
View this message in context: http://activemq.2283324.n4.nabble.com/Apollo-MQTT-server-throws-a-null-pointer-exception-on-disconnect-tp4674960.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Mime
View raw message