NumberFormatException in 'watch' protocol processing

Maurizio Panzica3 years ago

I purchased another (clone) GPS Tracker which has an updated firmware version. It seems to be still using the 'watch' protocol, but I get the following error in log:

2021-11-13 14:42:52  INFO: [2c4b19b2] connected
2021-11-13 14:42:52  INFO: [2c4b19b2: watch < 5.170.108.47] HEX: 5b53472a393035393035383232302a3030392a4c4b2c302c38305d
2021-11-13 14:42:54  INFO: [2c4b19b2: watch < 5.170.108.47] HEX: 5b53472a393035393035383232302a303035322a5544322c3133313132312c3133343234322c412c34312e39363630372c4e2c3031322e36363136332c452c302e302c3030302c302c30302c37302c38302c302c35302c30303030303030302c302c312c2c2c2c30305d
2021-11-13 14:42:54  WARN: [2c4b19b2] error - For input string: "" - NumberFormatException (... < WatchProtocolDecoder:146 < *:253 < ExtendedObjectDecoder:52 < ... < WrapperContext:102 < ...)

Am I using the wrong protocol?
Any clues, please?

Anton Tananaev3 years ago

Looks similar to this:

https://www.traccar.org/forums/topic/tk905-4gsa-watch-protocol-decode-error/

Have you already tried master branch?

Maurizio Panzica3 years ago

Thanks for your reply Anton.

Yep, exactly same problem (and same device too).

I haven't tried the master branch. I'm running Traccar on a OrangePi ARM Linux box and never tried to compile the source code myself...
Any suggestions to put me on track?
M.

Anton Tananaev3 years ago

We have documentation if you want to compile yourself. Alternative is to wait for the next official release.

Maurizio Panzica3 years ago

Fair enough.
Thanks Anton.

Maurizio Panzica3 years ago

Hello Anton,

I have compiled a new jar from 'master' branch, replaced tracker-server.jar and started the service again.
The server crashed with the following error:

2021-11-14 15:33:54  INFO: HikariPool-1 - Starting...
2021-11-14 15:33:59  INFO: HikariPool-1 - Added connection conn0: url=jdbc:h2:./data/database user=SA
2021-11-14 15:33:59  INFO: HikariPool-1 - Start completed.
2021-11-14 15:34:01  INFO: Set default schema name to PUBLIC
2021-11-14 15:34:01  INFO: Clearing database change log checksums
2021-11-14 15:34:02  INFO: Successfully acquired change log lock
2021-11-14 15:34:04  INFO: Successfully released change log lock
2021-11-14 15:34:04  INFO: Successfully acquired change log lock
2021-11-14 15:34:04  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2021-11-14 15:34:05  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2021-11-14 15:34:13  INFO: Reading from PUBLIC.DATABASECHANGELOG
2021-11-14 15:34:15  INFO: Reading from PUBLIC.DATABASECHANGELOG
2021-11-14 15:34:16  INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2021-11-14 15:34:16  INFO: Successfully released change log lock
2021-11-14 15:34:22  WARN: Error refreshing items - Table "TC_ORDERS" not found; SQL statement:
SELECT * FROM tc_orders [42102-200] - JdbcSQLSyntaxErrorException (... < QueryBuilder:64 < *:130 < DataManager:425 < BaseObjectManager:87 < ...)
2021-11-14 15:34:22  WARN: Error getting permissions - Table "TC_USER_ORDER" not found; SQL statement:
SELECT userId, orderId FROM tc_user_order [42102-200] - JdbcSQLSyntaxErrorException (... < QueryBuilder:64 < *:130 < DataManager:406 < SimpleObjectManager:82 < ...)
2021-11-14 15:34:22  WARN: Refresh permissions error - Table "TC_GROUP_ORDER" not found; SQL statement:
SELECT groupId, orderId FROM tc_group_order [42102-200] - JdbcSQLSyntaxErrorException (... < QueryBuilder:64 < *:130 < DataManager:406 < ExtendedObjectManager:99 < ...)
2021-11-14 15:34:22 ERROR: Main method error - IllegalMonitorStateException (... < BaseObjectManager:63 < ExtendedObjectManager:139 < *:44 < OrderManager:23 < ...)

So I moved database.* files to a safe place and started the server once again to let it create the database from scratch. The server crashed once again with the following error:

2021-11-14 15:44:47  INFO: HikariPool-1 - Starting...
2021-11-14 15:44:50  INFO: HikariPool-1 - Added connection conn0: url=jdbc:h2:./data/database user=SA
2021-11-14 15:44:50  INFO: HikariPool-1 - Start completed.
2021-11-14 15:44:52  INFO: Set default schema name to PUBLIC
2021-11-14 15:44:52  INFO: Clearing database change log checksums
2021-11-14 15:44:54  INFO: Successfully acquired change log lock
2021-11-14 15:44:54  INFO: Creating database history table with name: PUBLIC.DATABASECHANGELOG
2021-11-14 15:44:54  INFO: Successfully released change log lock
2021-11-14 15:44:54  INFO: Successfully acquired change log lock
2021-11-14 15:44:54  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2021-11-14 15:44:54  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2021-11-14 15:45:03  INFO: Reading from PUBLIC.DATABASECHANGELOG
2021-11-14 15:45:08  INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2021-11-14 15:45:08  INFO: Table tc_attributes created
2021-11-14 15:45:08  INFO: Table tc_calendars created
2021-11-14 15:45:08  INFO: Table tc_commands created
2021-11-14 15:45:08  INFO: Table tc_device_attribute created
2021-11-14 15:45:08  INFO: Table tc_device_command created
2021-11-14 15:45:08  INFO: Table tc_device_driver created
2021-11-14 15:45:08  INFO: Table tc_device_geofence created
2021-11-14 15:45:08  INFO: Table tc_device_maintenance created
2021-11-14 15:45:08  INFO: Table tc_device_notification created
2021-11-14 15:45:08  INFO: Table tc_devices created
2021-11-14 15:45:08  INFO: Table tc_drivers created
2021-11-14 15:45:08  INFO: Table tc_events created
2021-11-14 15:45:08  INFO: Table tc_geofences created
2021-11-14 15:45:08  INFO: Table tc_group_attribute created
2021-11-14 15:45:08  INFO: Table tc_group_command created
2021-11-14 15:45:08  INFO: Table tc_group_driver created
2021-11-14 15:45:08  INFO: Table tc_group_geofence created
2021-11-14 15:45:08  INFO: Table tc_group_maintenance created
2021-11-14 15:45:08  INFO: Table tc_group_notification created
2021-11-14 15:45:08  INFO: Table tc_groups created
2021-11-14 15:45:08  INFO: Table tc_maintenances created
2021-11-14 15:45:08  INFO: Table tc_notifications created
2021-11-14 15:45:08  INFO: Table tc_positions created
2021-11-14 15:45:08  INFO: Table tc_servers created
2021-11-14 15:45:08  INFO: Table tc_statistics created
2021-11-14 15:45:08  INFO: Table tc_user_attribute created
2021-11-14 15:45:08  INFO: Table tc_user_calendar created
2021-11-14 15:45:08  INFO: Table tc_user_command created
2021-11-14 15:45:09  INFO: Table tc_user_device created
2021-11-14 15:45:09  INFO: Table tc_user_driver created
2021-11-14 15:45:09  INFO: Table tc_user_geofence created
2021-11-14 15:45:09  INFO: Table tc_user_group created
2021-11-14 15:45:09  INFO: Table tc_user_maintenance created
2021-11-14 15:45:09  INFO: Table tc_user_notification created
2021-11-14 15:45:09  INFO: Table tc_user_user created
2021-11-14 15:45:09  INFO: Table tc_users created
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_command (commandid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_command (deviceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_driver (deviceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_driver (driverid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_geofence (deviceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_geofence (geofenceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_maintenance (deviceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_maintenance (maintenanceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_notification (deviceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_device_notification (notificationid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_devices (groupid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_events (deviceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_geofences (calendarid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_attribute (attributeid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_attribute (groupid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_command (commandid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_command (groupid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_driver (driverid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_driver (groupid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_geofence (geofenceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_geofence (groupid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_maintenance (groupid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_maintenance (maintenanceid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_notification (groupid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_group_notification (notificationid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_notifications (calendarid)
2021-11-14 15:45:09  INFO: Foreign key constraint added to tc_positions (deviceid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_attribute (attributeid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_attribute (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_calendar (calendarid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_calendar (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_command (commandid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_command (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_device_attribute (attributeid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_device_attribute (deviceid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_device (deviceid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_device (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_driver (driverid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_driver (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_geofence (geofenceid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_geofence (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_group (groupid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_group (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_maintenance (maintenanceid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_maintenance (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_notification (notificationid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_notification (userid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_user (userid)
2021-11-14 15:45:10  INFO: New row inserted into tc_servers
2021-11-14 15:45:10  INFO: New row inserted into tc_users
2021-11-14 15:45:10  INFO: ChangeSet changelog-4.0-clean::changelog-4.0-clean::author ran successfully in 2202ms
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_groups (groupid)
2021-11-14 15:45:10  INFO: Foreign key constraint added to tc_user_user (manageduserid)
2021-11-14 15:45:10  INFO: ChangeSet changelog-4.0-clean::changelog-4.0-clean-common::author ran successfully in 53ms
2021-11-14 15:45:10  INFO: Marking ChangeSet: changelog-3.3::changelog-3.3::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:10  INFO: Marking ChangeSet: changelog-3.5::changelog-3.5::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:10  INFO: Marking ChangeSet: changelog-3.6::changelog-3.6::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:10  INFO: Marking ChangeSet: changelog-3.7::changelog-3.7::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:10  INFO: Marking ChangeSet: changelog-3.7::changelog-3.7-notmssql::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:10  INFO: Marking ChangeSet: changelog-3.8::changelog-3.8::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.9::changelog-3.9::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.10::changelog-3.10::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.10::changelog-3.10-notmssql::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.10::changelog-3.10-mssql::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.10::changelog-3.7-mssql::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.11::changelog-3.11::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.12::changelog-3.12::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.12::changelog-3.12-notmssql::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.12::changelog-3.12-pgsql::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.14::changelog-3.14::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.15::changelog-3.15::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.16::changelog-3.16::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.17::changelog-3.3-admin::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-3.17::changelog-3.17::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-4.0::changelog-4.0-pre::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-4.0::changelog-4.0-common::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-4.0::changelog-4.0-pg::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-4.0::changelog-4.0::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-4.0::changelog-4.0-renaming::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : Not precondition failed

2021-11-14 15:45:11  INFO: Marking ChangeSet: changelog-4.1::changelog-4.1-mssql::author ran despite precondition failure due to onFail='MARK_RAN': 
          ./schema/changelog-master.xml : DBMS Precondition failed: expected mssql, got h2

2021-11-14 15:45:12  INFO: Index user_device_user_id created
2021-11-14 15:45:12  INFO: Index position_deviceid_fixtime created
2021-11-14 15:45:12  INFO: ChangeSet changelog-4.7::changelog-4.7::author ran successfully in 972ms
2021-11-14 15:45:12  INFO: Index event_deviceid_servertime created
2021-11-14 15:45:12  INFO: ChangeSet changelog-4.9::changelog-4.9::author ran successfully in 14ms
2021-11-14 15:45:12  INFO: Columns protocols(VARCHAR(4096)) added to tc_statistics
2021-11-14 15:45:12  INFO: ChangeSet changelog-4.10::changelog-4.10::author ran successfully in 72ms
2021-11-14 15:45:12  INFO: Columns announcement(VARCHAR(4000)) added to tc_servers
2021-11-14 15:45:12  INFO: ChangeSet changelog-4.11::changelog-4.11::author ran successfully in 37ms
2021-11-14 15:45:12  INFO: Column tc_events.servertime renamed to eventtime
2021-11-14 15:45:12  INFO: ChangeSet changelog-4.13::changelog-4.13::author ran successfully in 16ms
2021-11-14 15:45:13  INFO: Successfully released change log lock
2021-11-14 15:45:18  WARN: Error refreshing items - Table "TC_ORDERS" not found; SQL statement:
SELECT * FROM tc_orders [42102-200] - JdbcSQLSyntaxErrorException (... < QueryBuilder:64 < *:130 < DataManager:425 < BaseObjectManager:87 < ...)
2021-11-14 15:45:18  WARN: Error getting permissions - Table "TC_USER_ORDER" not found; SQL statement:
SELECT userId, orderId FROM tc_user_order [42102-200] - JdbcSQLSyntaxErrorException (... < QueryBuilder:64 < *:130 < DataManager:406 < SimpleObjectManager:82 < ...)
2021-11-14 15:45:18  WARN: Refresh permissions error - Table "TC_GROUP_ORDER" not found; SQL statement:
SELECT groupId, orderId FROM tc_group_order [42102-200] - JdbcSQLSyntaxErrorException (... < QueryBuilder:64 < *:130 < DataManager:406 < ExtendedObjectManager:99 < ...)
2021-11-14 15:45:18 ERROR: Main method error - IllegalMonitorStateException (... < BaseObjectManager:63 < ExtendedObjectManager:139 < *:44 < OrderManager:23 < ...)

Any suggestions?
Thanks.

Anton Tananaev3 years ago

You have to update schema files.

Maurizio Panzica3 years ago

Worked fine!
Thanks again, Anton! :-)

Maurizio Panzica3 years ago

Oh, on a final note I guess that recommending to update schema files on the documentation would save you the hassle of having to repeat it again. :-)

Keep the good work up and thanks for what you've done.
Cheers.
M.

Ruslan3 years ago

I had the same issues. How to update schema files?

Ruslan3 years ago

Issue was solved after update schema files in folder: /traccar/schema