Hi, I am following the Leshan demo client to develop my own client. When I try to connect my client to the secure sandbox server. It throws the exception as I described in the title. The full error log from the terminal is bellow;
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See
http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.network.config.NetworkConfig load
INFO: loading properties from file /home/cloud/iot-workspace/gateway/Californium.properties
Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.CoapServer start
INFO: Starting server
Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Starting endpoint at coaps://
0.0.0.0:0Aug 10, 2017 11:01:58 AM org.eclipse.californium.scandium.DTLSConnector start
INFO: DTLS connector listening on [
0.0.0.0/0.0.0.0:43978] with MTU [1,280] using (inbound) datagram buffer size [16,474 bytes]
Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Started endpoint at coaps://
0.0.0.0:43978Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Starting endpoint at coap://
0.0.0.0:0Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Started endpoint at coap://
0.0.0.0:60394Exception in thread "DTLS-Receiver-0.0.0.0/
0.0.0.0:43978" java.lang.NoSuchMethodError: org.eclipse.californium.elements.RawData.getMessageCallback()Lorg/eclipse/californium/elements/MessageCallback;
at org.eclipse.californium.scandium.DTLSConnector.sendMessage(DTLSConnector.java:1240)
at org.eclipse.californium.scandium.DTLSConnector.access$500(DTLSConnector.java:117)
at org.eclipse.californium.scandium.DTLSConnector$5.sessionEstablished(DTLSConnector.java:1285)
at org.eclipse.californium.scandium.dtls.Handshaker.sessionEstablished(Handshaker.java:871)
at org.eclipse.californium.scandium.dtls.ClientHandshaker.receivedServerFinished(ClientHandshaker.java:285)
at org.eclipse.californium.scandium.dtls.ClientHandshaker.doProcessMessage(ClientHandshaker.java:251)
at org.eclipse.californium.scandium.dtls.Handshaker.processMessage(Handshaker.java:406)
at org.eclipse.californium.scandium.DTLSConnector.processOngoingHandshakeMessage(DTLSConnector.java:812)
at org.eclipse.californium.scandium.DTLSConnector.processDecryptedHandshakeMessage(DTLSConnector.java:799)
at org.eclipse.californium.scandium.DTLSConnector.processHandshakeRecordWithConnection(DTLSConnector.java:783)
at org.eclipse.californium.scandium.DTLSConnector.processHandshakeRecord(DTLSConnector.java:719)
at org.eclipse.californium.scandium.DTLSConnector.receiveNextDatagramFromNetwork(DTLSConnector.java:448)
at org.eclipse.californium.scandium.DTLSConnector.access$200(DTLSConnector.java:117)
at org.eclipse.californium.scandium.DTLSConnector$3.doWork(DTLSConnector.java:330)
at org.eclipse.californium.scandium.DTLSConnector$Worker.run(DTLSConnector.java:1571)
It seems that the CoapEndpoint started two times and it bounded to two different ports, and the thread with the first port always threw the exception. I tried to find it out but couldn't find any possibility, hope you can give me some advice. The full code for that class is included in this
if you need some references.