You need to check full exception stack.
I would also recommend trying different Java version.
shellError: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/Injector
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
at java.lang.Class.privateGetMethodRecursive(Unknown Source)
at java.lang.Class.getMethod0(Unknown Source)
at java.lang.Class.getMethod(Unknown Source)
at sun.launcher.LauncherHelper.validateMainClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
Caused by: java.lang.ClassNotFoundException: com.google.inject.Injector
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
... 7 more
This is the exception log.
You mean this is the reason for jdk version?
Looks like you are missing some third party libraries or you are using wrong versions of dependencies.
But i can run nomally locally...
I use your project to build without changing anything,it also display the same error...
Is there something wrong with my packing method?
Kindly do check your Classpath setting on your MANIFESTwhen you compile the jar file
hi,
did you fix your problem, I think that I have the same problem, I have builded the tracker-server.jar but when I replace the file, the server can't start, I don't know where could I see some log for to show it. I check with java version 1.8 and 11, the command that I use is "./gradlew assemble".
thank you for your answer.
regards.
You don't know where to find logs? Where did you replace the file?
Hi. What file are you replacing ?
Hi,
I just know the tracker-server.log, but the de only register is shutdown server, when I try start the server I don’t see any new record.
My procedure is:
That was my procedure.
Thanks
Hi. Can you build using this way.
./gradlew build -x checkstyleMain
Miko Bonzo, how would that solve the problem?
Carlos Colque, did you build the correct version? What error do you get if you run Traccar manually from the command line?
Hi.
I did the manually start, it show me the next message:Error: A JNI error has occurred, please check your installation and try again Exception in thread "main" java.lang.NoClassDefFoundError: com/google/inject/Injector at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2701) at java.lang.Class.privateGetMethodRecursive(Class.java:3048) at java.lang.Class.getMethod0(Class.java:3018) at java.lang.Class.getMethod(Class.java:1784) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:650) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:632) Caused by: java.lang.ClassNotFoundException: com.google.inject.Injector at java.net.URLClassLoader.findClass(URLClassLoader.java:382) at java.lang.ClassLoader.loadClass(ClassLoader.java:418) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ... 7 more
It means that you haven't compiled the correct version.
Hi,i have a problem in this project.
I use
gradlew assemble
to build a jar in the build floder.But when i use
java -jar tracker-server.jar
,terminal displayError: A JNI error has occurred, please check your installation and try again
.(Project can be run locally)Could you give me some help?
Thanks.