Traccar v5.3 with SQL DB

JeBeL702 years ago

Getting the following issue on server start when using SQL server - any ideas what's going on here?

2022-08-09 12:15:38  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2022-08-09 12:15:38  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: ojdkbuild version: 11.0.15+9-LTS
2022-08-09 12:15:38  INFO: Memory limit heap: 16304mb non-heap: 0mb
2022-08-09 12:15:38  INFO: Character encoding: Cp1252 charset: windows-1252
2022-08-09 12:15:38  INFO: Version: 5.3
2022-08-09 12:15:38  INFO: Starting server...
2022-08-09 12:15:38  INFO: HikariPool-1 - Starting...
2022-08-09 12:15:39  INFO: HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: b15bb0ed-7169-4ef7-abe2-f3a904a7f598
2022-08-09 12:15:39  INFO: HikariPool-1 - Start completed.
2022-08-09 12:15:39  INFO: Set default schema name to dbo
2022-08-09 12:15:39  INFO: Clearing database change log checksums
2022-08-09 12:15:40  INFO: Successfully acquired change log lock
2022-08-09 12:15:40  INFO: Successfully released change log lock
2022-08-09 12:15:40  INFO: Successfully acquired change log lock
2022-08-09 12:15:40  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2022-08-09 12:15:40  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2022-08-09 12:15:41  INFO: Reading from DATABASECHANGELOG
2022-08-09 12:15:41  INFO: Reading from DATABASECHANGELOG
2022-08-09 12:15:41  INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2022-08-09 12:15:41  INFO: Columns fixedemail(BOOLEAN) added to tc_servers
2022-08-09 12:15:41  INFO: Columns fixedemail(BOOLEAN) added to tc_users
2022-08-09 12:15:41  INFO: Columns expirationtime(TIMESTAMP) added to tc_devices
2022-08-09 12:15:41  INFO: Table tc_keystore created
2022-08-09 12:15:41  INFO: Successfully released change log lock
2022-08-09 12:15:41 ERROR: Main method error - The index 'idx_users_token' is dependent on column 'token'. - SQLServerException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < Main:126 < ...)
2022-08-09 12:15:41  WARN: JNA: Callback org.traccar.WindowsService$ServiceMain@67b9b51a threw the following exception - The index 'idx_users_token' is dependent on column 'token'. - SQLServerException (... < DatabaseModule:96 < <gener:-1 < *:-1 < ... < Main:126 < ...)
JeBeL702 years ago

Update: Reverted to v5.2, starts up no errors:

2022-08-09 12:50:09  INFO: Operating system name: Windows 10 version: 10.0 architecture: amd64
2022-08-09 12:50:09  INFO: Java runtime name: OpenJDK 64-Bit Server VM vendor: ojdkbuild version: 11.0.15+9-LTS
2022-08-09 12:50:09  INFO: Memory limit heap: 16304mb non-heap: 0mb
2022-08-09 12:50:09  INFO: Character encoding: Cp1252 charset: windows-1252
2022-08-09 12:50:09  INFO: Version: 5.2
2022-08-09 12:50:09  INFO: Starting server...
2022-08-09 12:50:09  INFO: Your platform does not provide complete low-level API for accessing direct buffers reliably. Unless explicitly requested, heap buffer will always be preferred to avoid potential system instability.
2022-08-09 12:50:11  INFO: HikariPool-1 - Starting...
2022-08-09 12:50:12  INFO: HikariPool-1 - Added connection ConnectionID:1 ClientConnectionId: d5b56b57-520b-4fef-974a-5f4c5ea6c49f
2022-08-09 12:50:12  INFO: HikariPool-1 - Start completed.
2022-08-09 12:50:12  INFO: Set default schema name to dbo
2022-08-09 12:50:12  INFO: Clearing database change log checksums
2022-08-09 12:50:12  INFO: Successfully acquired change log lock
2022-08-09 12:50:12  INFO: Successfully released change log lock
2022-08-09 12:50:12  INFO: Successfully acquired change log lock
2022-08-09 12:50:12  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2022-08-09 12:50:12  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2022-08-09 12:50:13  INFO: Reading from DATABASECHANGELOG
2022-08-09 12:50:13  INFO: Reading from DATABASECHANGELOG
2022-08-09 12:50:13  INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2022-08-09 12:50:13  INFO: Successfully released change log lock
2022-08-09 12:50:14  WARN: Port disabled due to conflict - Address already in use: bind - BindException (...)
2022-08-09 12:50:14  INFO: jetty-10.0.7; built: 2021-10-06T19:34:02.766Z; git: da8a4553af9dd84080931fa0f8c678cd2d60f3d9; jvm 11.0.13+8-LTS
2022-08-09 12:50:14  INFO: Started o.t.w.@4ceceac2{/,null,AVAILABLE}
2022-08-09 12:50:14  INFO: Session workerName=node0
2022-08-09 12:50:14  WARN: JAXBContext implementation could not be found. WADL feature is disabled.
2022-08-09 12:50:15  INFO: Started o.e.j.s.ServletContextHandler@5f0c4b0e{/,null,AVAILABLE}
2022-08-09 12:50:15  INFO: Started ServerConnector@79ff2b8c{HTTP/1.1, (http/1.1)}{0.0.0.0:8082}
2022-08-09 12:50:15  INFO: Started Server@214e2d52{STARTING}[10.0.7,sto=0] @7478ms
Anton Tananaev2 years ago
JeBeL702 years ago

Anton,
thks for the quick response.
In the Git post, when you say try the new changelog, what has to be done?
I noticed 5.2 and 5.3 changelogs are vastly different from the TracCar 5.2 installed ones...
What has to be replaced and/or updated?
thanks again

Anton Tananaev2 years ago

Check the linked commit.

Joystick2 years ago

JeBel70
Check if you still have a "token" column in tc_users as it is meant to be dropped with change log 5.3 as per the below.

 <dropIndex indexName="idx_users_token" tableName="tc_users" />

    <dropColumn tableName="tc_users" columnName="token" />
JeBeL702 years ago

OK, sorted now... I applied the changes to the 5.3 changelog as noted by Anton, and up and running now.

prime1232 years ago

@JeBeL70
I have the same error. How excatly to apply the changes ? Thank you.

JeBeL702 years ago

Hi,

the linked commit that Anton had referenced is here: https://github.com/traccar/traccar/commit/eaa390e74ead87dc953a3af9dd22ee68b35d8a59

The new lines 35 and 36 as shown there need to be added to the file schema/changelog-5.3.xml, which can be found in your install directory (typically: C:\Program Files\Traccar\schema)

Stop the Traccar service, then edit that file for the new line that has to be added as shown in the commit:
<dropIndex indexName="idx_users_token" tableName="tc_users" />
Then restart the Traccar service.

As should be normal practice, ensure you backup your DB and configs etc. before making changes.

Hope this helps!

prime1232 years ago

Thank you. Appreciate the clear instructions.