The updated tracker-server.jar file is not loading the webpage after replacing in traccar installation.

shaik abdullah3 years ago

Hi, I have built the binary server jar file from intelliJ IDE, and I replaced that file in installation folder. after replacing i restarted the traccar server but the web page is failed to load.

but again I replaced the original jar file , it loads the web page and works well.

I don't know whats wrong with the jar file which I created from IntelliJ IDE.

Any help please ... ?

Anton Tananaev3 years ago

Have you done any troubleshooting? Like at the very least check if the process is running, check logs and console output?

shaik abdullah3 years ago

Yes, I tried running the jar in server like #java -jar tracker-server.jar conf/traccar.xml , but it gives me an error below

Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.
Exception in thread "main" java.lang.NoClassDefFoundError: org/jvnet/hk2/guice/bridge/api/GuiceBridge
        at org.traccar.web.WebServer$3.onStartup(WebServer.java:189)
        at org.glassfish.jersey.server.ApplicationHandler.onStartup(ApplicationHandler.java:711)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:156)
        at org.glassfish.jersey.servlet.ServletContainer.init(ServletContainer.java:347)
        at javax.servlet.GenericServlet.init(GenericServlet.java:180)
        at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:633)
        at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:415)
        at org.eclipse.jetty.servlet.ServletHandler.lambda$initialize$2(ServletHandler.java:690)
        at java.base/java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:357)
        at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:485)
        at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
        at java.base/java.util.stream.StreamSpliterators$WrappingSpliterator.forEachRemaining(StreamSpliterators.java:312)
        at java.base/java.util.stream.Streams$ConcatSpliterator.forEachRemaining(Streams.java:735)
        at java.base/java.util.stream.ReferencePipeline$Head.forEach(ReferencePipeline.java:658)
        at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:714)
        at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:392)
        at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:895)
        at org.eclipse.jetty.servlet.ServletContextHandler.doStart(ServletContextHandler.java:306)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:121)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.start(ContainerLifeCycle.java:171)
        at org.eclipse.jetty.server.Server.start(Server.java:469)
        at org.eclipse.jetty.util.component.ContainerLifeCycle.doStart(ContainerLifeCycle.java:114)
        at org.eclipse.jetty.server.handler.AbstractHandler.doStart(AbstractHandler.java:89)
        at org.eclipse.jetty.server.Server.doStart(Server.java:414)
        at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:93)
        at org.traccar.web.WebServer.start(WebServer.java:245)
        at org.traccar.Main.run(Main.java:127)
        at org.traccar.Main.main(Main.java:107)
Caused by: java.lang.ClassNotFoundException: org.jvnet.hk2.guice.bridge.api.GuiceBridge
        at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581)
        at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178)
        at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522)
        ... 32 more

, and I didn't try the console output because I don't know to check logs in server.

Please help brother .

Anton Tananaev3 years ago

Looks like you're missing some dependencies. Are you sure you have the latest version installed?

shaik abdullah3 years ago

yes , the version is latest one from git, can you post a new video in ur youtube channel which is about to build and replacing the jar file in proper method ?

shaik abdullah3 years ago

which is very helpful for upcoming beginners

Anton Tananaev3 years ago

I don't think you answered my question. What version do you have installed, not what you're compiling your jar file from.

shaik abdullah3 years ago

ok sorry , how can i check that version which i installed ?

Anton Tananaev3 years ago

You have to have the latest version before you can use a JAR from master.

shaik abdullah3 years ago

I used the latest version by cloning like this

git clone --recursive https://github.com/traccar/traccar.git
Anton Tananaev3 years ago

Again, you're talking about completely different thing. I'm talking about INSTALLED version.

shaik abdullah3 years ago

ok Sorry again, I have installed below version

traccar-linux-64-4.15 version

but, I have the modified jar file which built from windows traccar-windows-64-4.15.

And also , traccar is running without a port number declared, I know the default is 8082 but if add 8082 in the address bar the page is not loaded, its working without using port number.

shaik abdullah3 years ago

Hi, I realised the problem, actually I used the source code directly not from version release, so that the jar file is not working.

Now I tried the latest version 4.15 in which I generated the jar file and replaced in the server and which is working fine.

Finally its working great

Thanks for the help Anton Tananaev