Teltonika Decoder - Attribute Cast Error

Gps man2 years ago

Getting error for teltonika devices - Integer cannot be cast to class

2021-12-02 14:31:25  INFO: [2417b2f9: teltonika < 42.106.5.46] HEX: 00000000000000dd08030000017d7b8d890800298b71d40d8f4aa6ffb50142090000000e08ef00f0005000150545010100b300712e04420000180000430dbe0900570110005b962c01ee00000000000000000000017d7b8e736800298b71d40d8f4aa6ffab0142080000000e08ef00f0005000150545010100b300712e04420000180000430dbc0900570110005b962c01ee00000000000000000000017d7b8e92a800298b71d40d8f4aa6ffab0142090000f60f09ef00f0005000150545010100b300712df60104420000180000430db90900570110005b962c01ee00000000000000000300004950
2021-12-02 14:31:25  INFO: [2417b2f9: teltonika > 42.106.5.46] HEX: 00000003
2021-12-02 14:31:25  WARN: Attribute cast error - 
java.lang.ClassCastException: class java.lang.Integer cannot be cast to class java.lang.Boolean (java.lang.Integer and java.lang.Boolean are in module java.base of loader 'bootstrap')
    at org.traccar.handler.ComputedAttributesHandler.handlePosition(ComputedAttributesHandler.java:125)
    at org.traccar.BaseDataHandler.channelRead(BaseDataHandler.java:27)
    at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:379)
...
Anton Tananaev2 years ago

The error is in your computed attribute.

Gps man2 years ago

I m not able to find which one ? Anyways to locate the sameā€¦..

Gps man2 years ago

https://drive.google.com/file/d/1RhI0OyhqCC1jX7fUJxc9LIryXy2o2zd5/view?usp=sharing

This is the only computed attribute attached to that device.

Is there anything wrong here.

Anton Tananaev2 years ago

Yes. Zero is not a boolean value.

Gps man2 years ago

Thanks. How can I edit this to Number ? If I change in DB & restart traccar will it work ?

Anton Tananaev2 years ago

Yes.

Gps man2 years ago

Edited this and look forward to work. Let me keep watch on it.