Buid from source

Felipe Parentea month 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 Tananaeva month ago

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

Felipe Parentea month ago

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

BUILD SUCCESSFUL in 10s

Anton Tananaeva month ago

Fork from where? Master branch?

Felipe Parentea month 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 Tananaeva month ago

How did you deploy it after building?

Felipe Parentea month ago

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

Anton Tananaeva month ago

It won't work like that.

Felipe Parentea month 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 Tananaeva month ago

You're missing dependencies.

Felipe Parentea month 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 Tananaeva month ago

So you need to copy those dependencies.

Anton Tananaeva month ago

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

Felipe Parentea month 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 Tananaev25 days ago

It seems like you're still ignoring my recommendation.