Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/json/15.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Json 发送MQTT通知时发生OM2M NullPointerException_Json_Mqtt - Fatal编程技术网

Json 发送MQTT通知时发生OM2M NullPointerException

Json 发送MQTT通知时发生OM2M NullPointerException,json,mqtt,Json,Mqtt,我目前正在尝试使MQTT绑定适用于OM2MV1.4.1,我从源代码中编译以添加MQTT包,它似乎可以正确地用于创建Resources,因为我在创建新Resources时收到IN的响应 我目前正在尝试使订阅生效,但在触发订阅时出现问题,出现错误消息,并且没有在MQTT代理上进行发布 经纪人:莫斯奎托 Error message on the IN console : Exception in thread "pool-2-thread-3" java.lang.NullPoi

我目前正在尝试使MQTT绑定适用于OM2MV1.4.1,我从源代码中编译以添加MQTT包,它似乎可以正确地用于创建Resources,因为我在创建新Resources时收到IN的响应

我目前正在尝试使订阅生效,但在触发订阅时出现问题,出现错误消息,并且没有在MQTT代理上进行发布

经纪人:莫斯奎托

Error message on the IN console : 
Exception in thread "pool-2-thread-3" java.lang.NullPointerException
        at org.eclipse.om2m.core.notifier.Notifier$NotificationWorker.run(Notifier.java:296)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
notifier.java中的错误消息所指向的行:

request.setContent(DataMapperSelector.getDataMapperList().get(sub.getNotificationPayloadContentType()).objToString(notification));
订阅资源(我尝试了不同的URI,没有一个有效):

我已经试着修改“nu”,把
放进去mqtt://192.168.21.237:1883“
或指向某些任意主题的其他路径

内容实例资源(由邮递员发送):


文本/平面:0
测试
我在EclipseOM2M论坛上发了帖子,但没有得到回复。 有人能帮我解决这个问题吗

{\"m2m:rqp\" : 
            {\"m2m:fr\":\"admin:admin\"
             ,\"m2m:op\":1,\"m2m:pc\" :
                            {\"m2m:sub\":   
                                     {\"rn\":\"sub_ipe\"
                                      ,\"nu\": \"mqtt://192.168.21.237:1883/oneM2M/in-cse/admin:admin/json\"
                                      ,\"nct\":1
                                     }
                            },\"m2m:rqi\":\"m_createAE3567902\"
                             ,\"m2m:to\":\"in-cse/ipe/sub\"
                             ,\"m2m:ty\":23
             }
}
<m2m:cin xmlns:m2m="http://www.onem2m.org/xml/protocols">

    <cnf>text/plains:0</cnf>

    <con>
           test
    </con>

</m2m:cin>