Trying to update to latest source...

Adam6 years ago

Okay, so, banging my head on java and maven (I'm sure).

Updated java to 1.8, checked mvn --version, java -version, javac -version, all reporting 1.8

When I build it, it goes OK. When it starts up, I get this error.

INFO|wrapper|Service traccar|19-01-12 11:19:27|started process with pid 8156
INFO|8156/0|Service traccar|19-01-12 11:19:31|[INFO] StandardFileSystemManager - Using "/tmp/vfs_cache" as temporary files store.
INFO|8156/0|Service traccar|19-01-12 11:19:31|no java main method found -> aborting
INFO|8156/0|Service traccar|19-01-12 11:19:31|java.lang.NoClassDefFoundError: com/google/inject/Injector
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.lang.Class.getDeclaredMethods0(Native Method)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.lang.Class.privateGetDeclaredMethods(Class.java:2701)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.lang.Class.privateGetMethodRecursive(Class.java:3048)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.lang.Class.getMethod0(Class.java:3018)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.lang.Class.getMethod(Class.java:1784)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at org.rzo.yajsw.app.WrapperManagerImpl.loadJar(WrapperManagerImpl.java:877)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at org.rzo.yajsw.app.WrapperManagerImpl.init(WrapperManagerImpl.java:328)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at org.rzo.yajsw.app.WrapperManagerProxy.getWrapperManager(WrapperManagerProxy.java:53)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at org.rzo.yajsw.app.AbstractWrapperJVMMain$1.run(AbstractWrapperJVMMain.java:64)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.security.AccessController.doPrivileged(Native Method)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at org.rzo.yajsw.app.AbstractWrapperJVMMain.preExecute(AbstractWrapperJVMMain.java:56)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at org.rzo.yajsw.app.WrapperJVMMain.main(WrapperJVMMain.java:41)
INFO|8156/0|Service traccar|19-01-12 11:19:31|Caused by: java.lang.ClassNotFoundException: com.google.inject.Injector
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
INFO|8156/0|Service traccar|19-01-12 11:19:31|  ... 12 more
INFO|wrapper|Service traccar|19-01-12 11:19:32|waitpid 8156 59136
INFO|wrapper|Service traccar|19-01-12 11:19:32|exit code posix process: 59136 application(status/signal): 231/0

and then it dies.

During the maven build, the only message that seems interesting is

[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-bytecode-version) @ traccar ---
[WARNING] Invalid bytecodeVersion for module-info.class: expected 52, but was 53
[WARNING] Invalid bytecodeVersion for module-info.class: expected 52, but was 53

I also checked during the build and guice is being included...

[INFO] com.google.inject.extensions:guice-assistedinject:jar:4.2.1 already exists in destination.

I'm out of ideas as I'm not good with Java.

Adam6 years ago

must also copy lib folder.... derp.

Anton Tananaev6 years ago

Looks like for some reason the class is missing from the classpath. Have you copied all the libraries?

Adam6 years ago

I fixed it, once I copied the lib folder over to the installation. That's what the derp was for. It's all good now and your commit for the driver ID works. Even though for the alerts I would suggest that it goes "Driver has changed: [name if defined] (keyfob identifier) instead of how it is right now.