watch protocol - NumberFormatException

Khaksar 4 years ago

I am using watch protocol. Sometimes I see in the log that an exception is happening while it reports LBS.

Like with bellow message:
[3G*12000000022*00DD*UD,010120,025946,V,0.0,N,0.0,E,22.0,0,-1,0,100,98,0,0,00000000,0,5,eduroam,f4:db:e6:d2:a8:00,-53,eduroam,f4:db:e6:da:d0:80,-79,eduroam,78:0c:f0:24:f9:80,-82,Lions,b0:be:76:0a:05:9a,-82,tubs-guest,f4:db:e6:d2:a8:01,-53,0.0]

Directly after this message in the logs, I see:
WARN: [f3b415a4] error - For input string: "eduroam" - NumberFormatException (... < WatchProtocolDecoder:146 < *:267 < ExtendedObjectDecoder:52 < ... < WrapperContext:102 < ...)

I think traccar is facing some problem during decoding the message, but still not sure.

Anton Tananaev 4 years ago
  1. What version of Traccar are you using?
  2. Do you have protocol documentation?
Khaksar 4 years ago
  1. I am using Traccar version 4.15.
  2. Here is the link to the protocol documentation.
Anton Tananaev 4 years ago
  1. Have you tried 5.0 or even better master?
  2. Your documentation doesn't match your actual sample.
Khaksar 4 years ago
  1. I will try with master and will feedback accordingly.
  2. Ohh... I will ask manufacturer if they have something different.
Khaksar 4 years ago

Here I get the updated protocol documentation from the manufacturer.

Anton Tananaev 4 years ago

And what about trying the master?

Khaksar 4 years ago

I run the test on master and it didn't passed, the same problem still exists.

A part of the test error:

For input string: "eduroam"
java.lang.NumberFormatException: For input string: "eduroam"
	at java.base/java.lang.NumberFormatException.forInputString(NumberFormatException.java:67)
	at java.base/java.lang.Integer.parseInt(Integer.java:660)
	at java.base/java.lang.Integer.parseInt(Integer.java:778)
	at org.traccar.protocol.WatchProtocolDecoder.decodePosition(WatchProtocolDecoder.java:163)....
Khaksar 4 years ago

I created a pull request #4874 which may this problem with.