You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It successfully compiled but gave me a NullPointerException with endpointsProvider. The full error message looks like this:
Exception in thread "main" java.lang.NullPointerException: Cannot invoke "org.eclipse.leshan.client.endpoint.LwM2mClientEndpointsProvider.init(org.eclipse.leshan.client.resource.LwM2mObjectTree, org.eclipse.leshan.client.request.DownlinkRequestReceiver, org.eclipse.leshan.client.endpoint.ClientEndpointToolbox)" because "endpointsProvider" is null
at org.eclipse.leshan.client.LeshanClient.<init>(LeshanClient.java:123)
at org.eclipse.leshan.client.LeshanClientBuilder.createLeshanClient(LeshanClientBuilder.java:364)
at org.eclipse.leshan.client.LeshanClientBuilder.build(LeshanClientBuilder.java:328)
at com.jjh.maven.leshan_client_example.App.main(App.java:13)
In my understanding it seems that I need to call builder.setEndpointsProviders explicitly as builder.endpointsProvider is never initialized with the example code.
Is the tutorial code incomplete? or did I miss something?
If the example code is incomplete, can I ask where I can find a working and concise tutorial code for building a simple client (expecting much simpler code than LeshanClientDemo.java)
Thanks in advance.
The text was updated successfully, but these errors were encountered:
Is the tutorial code incomplete? or did I miss something?
Not really the turorial says : "To develop your client you need to use the leshan-client-cf module. To know the last 1.x version."
👆 it is about Leshan version 1.x
For now there is no tutorial for version 2.x. 😞
So
either you can live with LWM2M v1.0.x and you can use Leshan v1.x and use the tutorial as it.
or if you need LWM2M v1.1.x, you need to go with the in-developement version of Leshan v2.x. and there is no tutorial for now, but you could look at leshan-client-demo as example to fix the tutorial OR look at Add Transport Layer abstraction at Client side. #1323 (for client API).
To learn more about new endpoint provider API (client, server, bootstrap server) : #1025 (comment)
Question
I am new to this leshan LwM2M library so please understand me even if my question is a stupid one.
I tried to strictly follow the instructions given by https://github.com/eclipse-leshan/leshan/wiki/Getting-Started-:-Client but I failed to run the tutorial code.
I added specified maven dependencies with 2.0.0-m14 for the leshan library version under the tag in my pom.xml.
I put the example code in my main function, resulting in the following code:
It successfully compiled but gave me a
NullPointerException
with endpointsProvider. The full error message looks like this:In my understanding it seems that I need to call
builder.setEndpointsProviders
explicitly asbuilder.endpointsProvider
is never initialized with the example code.Is the tutorial code incomplete? or did I miss something?
If the example code is incomplete, can I ask where I can find a working and concise tutorial code for building a simple client (expecting much simpler code than
LeshanClientDemo.java
)Thanks in advance.
The text was updated successfully, but these errors were encountered: