Buid from source

Felipe Parente 5 months ago

I need to generate a custom version of Trachcar, following the instructions on the page: https://www.traccar.org/build/

Git Clone occurred normally.
The changes were made and tested.
Build occurred normally with the command: ./GRADLEW Assembly

However, Traccar cannot climb, searching for the following error:

traccar[596346]: Exception in thread "main" java.lang.NoClassDefFoundError: com/fasterxml/jac>
traccar[596346]:         at org.traccar.Main.run(Main.java:117)
traccar[596346]:         at org.traccar.Main.main(Main.java:111)
traccar[596346]: Caused by: java.lang.ClassNotFoundException: com.fasterxml.jackson.module.bl>
traccar[596346]:         at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(Builti>
traccar[596346]:         at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadCla>
traccar[596346]:         at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:526)
traccar[596346]:         ... 2 more
systemd[1]: traccar.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: traccar.service: Failed with result 'exit-code'.
Anton Tananaev 5 months ago

Did you build from master head? You're probably missing dependencies.

Felipe Parente 5 months ago

I created a fork, made the changes, gave Commit and push.
The build seemed ok to me.

BUILD SUCCESSFUL in 10s

Anton Tananaev 5 months ago

Fork from where? Master branch?

Felipe Parente 5 months ago

The fork was from Master.
This is the link: https://github.com/felipeparant/traccar

I need to get the JMAK updates, which has not yet left and a change I made in the Huabao protocol.

Anton Tananaev 5 months ago

How did you deploy it after building?

Felipe Parente 5 months ago

I stopped the service, replaces the "tracker-server.jar" file and tried to go up again.

Anton Tananaev 5 months ago

It won't work like that.

Felipe Parente 5 months ago

But, in this link, don't you send it like this?
https://www.traccar.org/build/

"It will automatically download all dependencies and generate tracker-server.jar in the target subfolder. Now you can just replace the file in your Traccar installation and restart the service for changes to take affect. Make sure you have a compatible version of Traccar installed. Use the latest release when using the master branch for development."

Anton Tananaev 5 months ago

You're missing dependencies.

Felipe Parente 5 months ago

Yes, that's what I posted in the first message.
But in instruction they have:

"It will automatically download all dependencies and generate tracker-server.jar in the target subfolder"

Anton Tananaev 5 months ago

So you need to copy those dependencies.

Anton Tananaev 5 months ago

But even better if you don't use master branch, unless you know exactly what you're doing.

Felipe Parente 5 months ago

I tried several ways.
Including downloading and compiling it on my own server (Linux).
But after the build is finished and the .jar is generated, it won't upload.
I also tried downloading the official code.
I think there's something missing, besides this command:
./gradlew assemble

Anton Tananaev 5 months ago

It seems like you're still ignoring my recommendation.