Java sample project for LwM2M | Thales IoT Developer Community
April 7, 2020 - 2:31pm, 1568 views
Hello,
I am working on the use of LwM2M in the PLS62-W module. And I need help.
The sample project for Lwm2m for Elipse contains errors. For example, it contains links to such packages that I can't find:
import com.gemalto.lwm2m.client.model.Lwm2mFloat;
import com.gemalto.lwm2m.client.model.Lwm2mInteger;
import com.gemalto.lwm2m.client.model.Lwm2mOpaque;
import com.gemalto.lwm2m.client.model.Lwm2mString;
After modifying this project and removing packages and methods that cause errors, an exception appears after starting the midlet:
2020-04-07 14: 09: 18: 658 [INFO] [Lwm2mClientInternalBuilder] start to parse customized object from file: /CustomizedObjects.json
can not build lwm2m client, message: Target file doesn't exist
But the .jar file contains the CustomizedObjects.json file.
Do you have any working sample projects for Lwm2m?
Hello,
Can you specify where you have this example from - installCD version? I've found an example on installCD without such imports.
It should be possible to read the file from the jar but it should also work from the file on FFS with this path: "file:///a:/CustomizedObjects.json".
Best regards,
Bartłomiej
Hello BARTŁOMIEJ,
Thanks for your reply.
I have the installCD version: pls62-w_rev02.000_arn01.000.04_install-cd
I downloaded it from this thread: https://iot-developer.thalesgroup.com/documentation/download-documentation-javalinux-sdk-and-drivers-gemalto-m2m-wireless-modules
By the way, in the properties of the sample project there are other errors:
in "Java Build Patch" / Source:
Lwm2mMidlet / res (missing)
in "Java Build Patch" / Projects:
lwm2m-client-api (missing)
lwm2m-client-core-javacd (missing)
I also tried to use the .json file located on FFS, but the result is exactly the same:
MIDlet: Lwm2mMidlet terminated
2018-01-01 02: 14: 23: 015 [INFO] [Lwm2mClientInternalBuilder] start to parse customized object from file : file:///a:/CustomizedObjects.json
can not build lwm2m client, message: Target file doesn't exist
Best regards,
Marcin
Hello,
I've checked this version and indeed there's something incorrect with the libraries as you have descrived. I have the other version of this demo from some other installCD where there are com.cinterion packages instead of com.gemalto. I think that it would be the best way if you report this directly to your distributor or Gemalto/Thales contact.
Regards,
Bartłomiej