Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 46EC410B97 for ; Sat, 30 Nov 2013 00:46:32 +0000 (UTC) Received: (qmail 28418 invoked by uid 500); 30 Nov 2013 00:46:31 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 28374 invoked by uid 500); 30 Nov 2013 00:46:31 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 28366 invoked by uid 99); 30 Nov 2013 00:46:31 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Nov 2013 00:46:31 +0000 X-ASF-Spam-Status: No, hits=1.3 required=5.0 tests=SPF_PASS,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy includes SPF record at spf.trusted-forwarder.org) Received: from [216.139.250.139] (HELO joe.nabble.com) (216.139.250.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 30 Nov 2013 00:46:26 +0000 Received: from [192.168.236.139] (helo=joe.nabble.com) by joe.nabble.com with esmtp (Exim 4.72) (envelope-from ) id 1VmYgl-00018O-7V for users@activemq.apache.org; Fri, 29 Nov 2013 16:45:39 -0800 Date: Fri, 29 Nov 2013 16:45:24 -0800 (PST) From: Brian Reinhold To: users@activemq.apache.org Message-ID: <1385772324127-4674960.post@n4.nabble.com> Subject: Apollo MQTT server throws a null pointer exception on disconnect MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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.