2021-05-26 14:10
@杜福忠 mqtt先启动的,启动了接收订阅的消息,然后处理,然后调用保存,就报错
2021-05-26 10:35
@杜福忠 连接断开,可以做重连
MqttException (0) - java.lang.NullPointerException
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:228)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NullPointerException
at com.jfinal.plugin.activerecord.Db.save(Db.java:496)
at cn.org.zhny.mqtt.PushCallback.handleMsg(PushCallback.java:99)
at cn.org.zhny.mqtt.PushCallback.messageArrived(PushCallback.java:76)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.deliverMessage(CommsCallback.java:519)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.handleMessage(CommsCallback.java:417)
at org.eclipse.paho.client.mqttv3.internal.CommsCallback.run(CommsCallback.java:214)
... 1 more
Db + Record 还是报错,应该是线程的问题,再搜搜看看怎么解决吧,谢谢