JNI Error On Manual Install on Win32

ilevans3 years ago

I attempted to upgrade (Manual install) the latest version traccar-other-4.13.zip on a Win7-32 computer.
I am receiving the following error. . .

Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/traccar/Main 
has been compiled by a more recent version of the Java Runtime (class file 
version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

I have upgraded Java to the latest version: Version 8 Update 291 (build 1.8.0_291-b10).
I have reverted to my backup of the previous manual install.

Anton Tananaev3 years ago

You need Java 11 or newer.

ilevans3 years ago

I have located OpenJDK 16 at https://adoptopenjdk.net/ which appears to be the latest version.
Will this be suitable?

Anton Tananaev3 years ago

I would install version 11 instead because it's LTS, but version 16 should work as well.

Why not Oracle version? It's more common.

https://www.oracle.com/java/technologies/javase-downloads.html

ilevans3 years ago

Doesn't look like it will be compatible with Win7 as it requries 2012R2 or later. I'll keep looking.

ilevans3 years ago

Sorry Anton, our post crossed. I am following your link for the Oracle version.

ilevans3 years ago

The oracle version is for X64. I need one for Win7-X86.

Anton Tananaev3 years ago

Then maybe adoptopenjdk is your best bet.

ilevans3 years ago

I am going to give it a go and see how it goes.
From reading, Oracle went to only X64 architecture as of Version 9.

I will report back on my results. It will be another 4 hours before I can try again.

ilevans3 years ago

Well I have installed Java 11 from adoptopenjdk and then executed the old version of traccar and it worked. Great Start.

I then test ran the latest version of traccar (traccar-other-4.13.zip) and it actually executed this time but it then crashed.
The log file is showing the following. . .

2021-06-04 12:32:48  INFO: HikariPool-1 - Starting...
2021-06-04 12:32:50  INFO: HikariPool-1 - Start completed.
2021-06-04 12:32:51  INFO: Clearing database change log checksums
2021-06-04 12:32:52  INFO: Successfully acquired change log lock
2021-06-04 12:32:53  INFO: Successfully released change log lock
2021-06-04 12:32:53  INFO: Successfully acquired change log lock
2021-06-04 12:32:53  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.json.JsonChangeLogParser Unable to get public no-arg constructor
2021-06-04 12:32:53  INFO: Cannot load service: liquibase.parser.ChangeLogParser: liquibase.parser.core.yaml.YamlChangeLogParser Unable to get public no-arg constructor
2021-06-04 12:32:55  INFO: Reading from DATABASECHANGELOG
2021-06-04 12:32:55  INFO: Reading from DATABASECHANGELOG
2021-06-04 12:32:55  INFO: Cannot load service: liquibase.hub.HubService: Provider liquibase.hub.core.StandardHubService could not be instantiated
2021-06-04 12:32:57  INFO: Index user_device_user_id created
2021-06-04 12:32:57  INFO: Successfully released change log lock
2021-06-04 12:32:57 ERROR: Main method error - The operation failed because an index or statistics with name 'position_deviceid_fixtime' already exists on table 'tc_positions'. - SQLServerException (... < DataManager:293 < *:86 < Context:290 < Main:120 < ...)

Any ideas? Meanwhile I will revert to the old version of traccar.

Anton Tananaev3 years ago

Looks like some database migration issue. What version did you have previously?

ilevans3 years ago

I wish there was an easy way to identify the version that was running.
From looking in the database and in the schema folder it appears to be 4.1

Anton Tananaev3 years ago

Try removing position_deviceid_fixtime index from changelog files.

ilevans3 years ago

I removed position_deviceid_fixtime index from changelog-4.7.xml and traccar successfully started.

It is now running the latest version of traccar.

Many thanks Anton, your support is brilliant as always.