Buid from source

Felipe Parente last year

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 last year

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

Felipe Parente last year

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

BUILD SUCCESSFUL in 10s

Anton Tananaev last year

Fork from where? Master branch?

Felipe Parente last year

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 last year

How did you deploy it after building?

Felipe Parente last year

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

Anton Tananaev last year

It won't work like that.

Felipe Parente last year

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 last year

You're missing dependencies.

Felipe Parente last year

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 last year

So you need to copy those dependencies.

Anton Tananaev last year

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

Felipe Parente last year

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 last year

It seems like you're still ignoring my recommendation.