in the bsserver console:
Aug 16, 2016 8:09:48 PM org.eclipse.californium.scandium.DTLSConnector start
INFO: DTLS connector listening on [
0.0.0.0/0.0.0.0:5684] with MTU [1,280] using (inbound) datagram buffer size [16,474 bytes]
[2016-08-16 20:09:49,005 INFO LwM2mBootstrapServerImpl] Bootstrap server started at coap://
0.0.0.0/0.0.0.0:5683, coaps://
0.0.0.0/0.0.0.0:5684.
[2016-08-16 20:09:49,257 INFO LeshanBootstrapServerDemo] Web server started at
http://127.0.1.1:8080/.
[2016-08-16 20:11:40,037 ERROR BootstrapResource] Exception while handling a request on the /bs resource
java.lang.NullPointerException
at org.eclipse.leshan.server.bootstrap.demo.BootstrapSecurityStoreImpl.getAllByEndpoint(BootstrapSecurityStoreImpl.java:63) ~[leshan-bsserver-demo.jar:?]
at org.eclipse.leshan.server.impl.BootstrapSessionManagerImpl.begin(BootstrapSessionManagerImpl.java:47) ~[leshan-bsserver-demo.jar:?]
at org.eclipse.leshan.server.bootstrap.BootstrapHandler.bootstrap(BootstrapHandler.java:83) ~[leshan-bsserver-demo.jar:?]
at org.eclipse.leshan.server.californium.impl.BootstrapResource.handlePOST(BootstrapResource.java:115) ~[leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.CoapResource.handleRequest(CoapResource.java:216) ~[leshan-bsserver-demo.jar:?]
at org.eclipse.leshan.server.californium.impl.BootstrapResource.handleRequest(BootstrapResource.java:57) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.server.ServerMessageDeliverer.deliverRequest(ServerMessageDeliverer.java:85) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.CoapStack$StackTopAdapter.receiveRequest(CoapStack.java:185) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.AbstractLayer.receiveRequest(AbstractLayer.java:91) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.AbstractLayer.receiveRequest(AbstractLayer.java:91) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.BlockwiseLayer.receiveRequest(BlockwiseLayer.java:263) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.AbstractLayer.receiveRequest(AbstractLayer.java:91) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.ReliabilityLayer.receiveRequest(ReliabilityLayer.java:239) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.AbstractLayer.receiveRequest(AbstractLayer.java:91) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.stack.CoapStack.receiveRequest(CoapStack.java:133) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.receiveMessage(CoapEndpoint.java:722) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl.access$900(CoapEndpoint.java:647) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.CoapEndpoint$InboxImpl$1.run(CoapEndpoint.java:661) [leshan-bsserver-demo.jar:?]
at org.eclipse.californium.core.network.CoapEndpoint$5.run(CoapEndpoint.java:819) [leshan-bsserver-demo.jar:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_91]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) [?:1.8.0_91]
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) [?:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [?:1.8.0_91]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [?:1.8.0_91]
at java.lang.Thread.run(Thread.java:745) [?:1.8.0_91]
bootstrap.json
{
"client1": {
"servers": {
"0": {
"shortId": 123,
"lifetime": 20,
"defaultMinPeriod": 1,
"notifIfDisabled": true,
"binding": "U"
}
},
"security": {
"0": {
"uri": "coap://localhost:5683",
"bootstrapServer": true,
"securityMode": "NO_SEC",
"publicKeyOrId": [],
"serverPublicKeyOrId": [],
"secretKey": [],
"smsSecurityMode": "NO_SEC",
"smsBindingKeyParam": [],
"smsBindingKeySecret": [],
"serverSmsNumber": "",
"serverId": 111,
"clientOldOffTime": 1
},
"1": {
"uri": "coap://localhost:15683",
"bootstrapServer": false,
"securityMode": "NO_SEC",
"publicKeyOrId": [],
"serverPublicKeyOrId": [],
"secretKey": [],
"smsSecurityMode": "NO_SEC",
"smsBindingKeyParam": [],
"smsBindingKeySecret": [],
"serverSmsNumber": "",
"serverId": 123,
"clientOldOffTime": 1
}
}
}
}
Best Regards,
Caio Pereira