Can not start traccar java -jar tracker-server.jar conf/traccar.xml

gabrielcz6 years ago

Have this error trying to start server...

root@GEtotal:/opt/traccar# java -version
java version "1.7.0_171"
OpenJDK Runtime Environment (IcedTea 2.6.13) (7u171-2.6.13-0ubuntu0.14.04.2)
OpenJDK 64-Bit Server VM (build 24.171-b02, mixed mode)

root@GEtotal:/opt/traccar# java -jar tracker-server.jar conf/traccar.xml 
Exception in thread "main" java.lang.UnsupportedClassVersionError: org/traccar/Main : Unsupported major.minor version 52.0
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:803)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:442)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:64)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:354)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:348)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:347)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:312)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
    at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
root@GEtotal:/opt/traccar# 

Can be something about java version?

Anton Tananaev6 years ago

Yes, it is. You are using ancient and no longer maintained version of Java. You have to upgrade at least to Java 8, but ideally to Java 10 or 11.