updating tracker-server.jar

shahab2 years ago

Hello everyone,
while i update tracker-server.jar file, i am getting this error

Apr 25 03:59:16 ip-172-31-10-137 systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
Apr 25 03:59:16 ip-172-31-10-137 systemd[1]: traccar.service: Failed with result 'exit-code'.

when i update,

  1. stop traccar service
  2. delete tracker-server.jar file (/opt/traccar)
  3. upload my custome tracker-server.jar file to server
  4. place it in the orignal dir(/opt/traccar)
  5. start the traccar service.
    but when i check the status of service(systemctl status traccar), it is giving the above error
shahab2 years ago

when i have check syslog, this is i am getting

Apr 25 03:53:34 ip-172-31-10-137 traccar[27741]: Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory
Apr 25 03:53:34 ip-172-31-10-137 traccar[27741]: #011at org.traccar.Main.<clinit>(Main.java:43)
Apr 25 03:53:34 ip-172-31-10-137 traccar[27741]: Caused by: java.lang.ClassNotFoundException: org.slf4j.LoggerFactory
Apr 25 03:53:34 ip-172-31-10-137 traccar[27741]: #011at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:641)
Apr 25 03:53:34 ip-172-31-10-137 traccar[27741]: #011at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:188)
Apr 25 03:53:34 ip-172-31-10-137 traccar[27741]: #011at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:520)
Apr 25 03:53:34 ip-172-31-10-137 traccar[27741]: #011... 1 more
Anton Tananaev2 years ago

It probably means you're using incompatible JAR file.

shahab2 years ago

i have checked the jar file and its working fine, is there any other way of updating the server or i am doing something wrong

Anton Tananaev2 years ago

We have documentation on how to update the server.

Check the java version you used to compile the project and the jre you are running on the server.
As well as if you've uploaded all the necessary libraries for your modified project.