[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
|
Re: [leshan-dev] Request for LeshanServer side exception assistance
|
The error is when we try to decode a TLV entry of type
RESOURCE_INSTANCE with a 25968 identifier.
TLV entry that the value is 8762 bytes length but there is only 506
bytes remaining in the TLV buffer we try to decode ...
So as your model hasn't any multiple resource, I suspect your Tlv is
malformed.
What client did you use ?
Simon
Le 22/10/2015 12:12, Brighter Agyemang
a écrit :
Thanks very much for your direction.
Sorry for not mentioning this earlier, I use a different
json file that has the current contents of the oma-objects-spec.json and my custom
object models of which the 12207 is part of.
Please find attached the object model as found in my json
file (12207.txt). What I have done is to use a custom loader
to load this as well as other object mdoels from the json
file.
Loader method:
public static LwM2mModel loadCustomObjectModel(String
objectModelStr)
{
InputStream myJsonStr;
myJsonStr =
LwM2mModelLoader.class.getResourceAsStream(objectModelStr);
LwM2mModel customModel;
HashMap<Integer, ObjectModel> map = null;
if(myJsonStr != null)
{
List<ObjectModel> objectModels =
ObjectLoader.loadJsonStream(myJsonStr);
map = new HashMap<>();
for (ObjectModel objectModel : objectModels)
{
map.put(objectModel.id, objectModel);
}
log.info("file {} successfully
loaded",objectModelStr);
}
else
{
try {
throw new Exception("Error loading json
file");
} catch (Exception ex) {
log.error(ex.getMessage());
}
}
customModel = new LwM2mModel(map);
return customModel;
}
So I submit this model when creating an object of the
ObjectsInitializer class and it works okay for all other
objects but the 12207 after sometime.
I have also attached the message that comes along with the
tlvException that is thrown in my log.
Thanks for your assistance
-Brighter
_______________________________________________
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