Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [leshan-dev] Leshan Client on start throws Exception in thread "DTLS-Receiver" java.lang.NoSuchMethodError

Hi,

I just want to give some notifications. My californium dependency was version 2.0.0-M4, after I lowered it to version 2.0.0-M3, everything works fine now.

Thank you for your help.
Best regards,
T.Q.Nguyen

2017-08-10 16:12 GMT+02:00 Thong Q. Nguyen <quocthong.ng@xxxxxxxxx>:
HI,

Thank you for your suggestion. I tried the very hard way to delete the .m2 folder. But after building with maven, the same error still happened. Guess I should try something else.



2017-08-10 15:45 GMT+02:00 Kraus Achim (INST/ECS4) <Achim.Kraus@xxxxxxxxxxxx>:

Hi,

 

If you have a lot of time for new downloads, the very hard way may be to delete all maven repos deleting the “.m2” folder

and then build leshan again. But I’m sure, others provide smarter solutions J.

 

Mit freundlichen Grüßen / Best regards

Achim Kraus

(INST/ECS4)
Bosch Software Innovations GmbH | Stuttgarter Straße 130 | 71332 Waiblingen | GERMANY
| www.bosch-si.com

Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr.-Ing. Rainer Kallenbach, Michael Hahn



From: leshan-dev-bounces@xxxxxxxxxxx [mailto:leshan-dev-bounces@eclipse.org] On Behalf Of Thong Q. Nguyen
Sent: Donnerstag, 10. August 2017 15:03


To: leshan developer discussions <leshan-dev@xxxxxxxxxxx>
Subject: Re: [leshan-dev] Leshan Client on start throws Exception in thread "DTLS-Receiver" java.lang.NoSuchMethodError

 

Hi,

Can you suggest me how to fix it ? As I use maven install it states that build is successful, for the latter you mentioned I am not sure how to fix it.

Thank you for your help,

T.Q Nguyen

 

2017-08-10 14:50 GMT+02:00 Kraus Achim (INST/ECS4) <Achim.Kraus@xxxxxxxxxxxx>:

Hi,

> Exception in thread "DTLS-Receiver-0.0.0.0/http://0.0.0.0:43978" java.lang.NoSuchMethodError: org.eclipse.californium.elements.RawData.getMessageCallback()Lorg/eclipse/californium/elements/MessageCallback;

for me this smells either as an "build error" or as an unclear classpath (also containing an old variant of RawData).

Mit freundlichen Grüßen / Best regards

Achim Kraus

(INST/ECS4)
Bosch Software Innovations GmbH | Stuttgarter Straße 130 | 71332 Waiblingen | GERMANY | http://www.bosch-si.com

Sitz: Berlin, Registergericht: Amtsgericht Charlottenburg; HRB 148411 B
Aufsichtsratsvorsitzender: Dr.-Ing. Thorsten Lücke; Geschäftsführung: Dr.-Ing. Rainer Kallenbach, Michael Hahn



From: leshan-dev-bounces@xxxxxxxxxxx [mailto:leshan-dev-bounces@eclipse.org] On Behalf Of Thong Q. Nguyen
Sent: Donnerstag, 10. August 2017 14:48
To: leshan developer discussions <leshan-dev@xxxxxxxxxxx>
Subject: Re: [leshan-dev] Leshan Client on start throws Exception in thread "DTLS-Receiver" java.lang.NoSuchMethodError

Hi,
Just some more information. This error happens when I try to use the secured connection. In unsecured mode, it works fine.
On the leshan demo server (hosted by Eclipse). I use the identity "mypskid" and the psk "aabbccdd". In my leshan client implementation, because I didn't use command line, so I just directly convert the identity and psk from string like this:

private final static String pskIdentityDefault = "mypskid";
private final static String pskKeyDefault = "aabbccdd";

pskId = pskIdentityDefault.getBytes();
pskKey = Hex.decodeHex(pskKeyDefault.toCharArray());
The dependencies I used for my maven project is at the latest version 1.0.0-M3. I literally implement my client based on the Leshan demo so I am not sure what is causing the exception.
Thank you in advance.
Best regards,
T.Q.Nguyen


2017-08-10 11:09 GMT+02:00 Thong Q. Nguyen <mailto:quocthong.ng@xxxxxxxxx>:
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://http://0.0.0.0:0
Aug 10, 2017 11:01:58 AM org.eclipse.californium.scandium.DTLSConnector start
INFO: DTLS connector listening on [http://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://http://0.0.0.0:43978
Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Starting endpoint at coap://http://0.0.0.0:0
Aug 10, 2017 11:01:58 AM org.eclipse.californium.core.network.CoapEndpoint start
INFO: Started endpoint at coap://http://0.0.0.0:60394
Exception in thread "DTLS-Receiver-0.0.0.0/http://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 https://pastebin.com/reY3aVhx if you need some references.
Thank you for your help.
Best regards,
T.Q.Nguyen


_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev

 


_______________________________________________
leshan-dev mailing list
leshan-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/leshan-dev




Back to the top