Problems when building from traccar sources

oM 7 years ago

Hi Anton,
I have made some changes to the traccar sources and I am trying to generate the traccar installer but it is created incomplete, the jar file does not appear.
I am working with:

  • Ubuntu 18.04
  • IntelliJ IDEA 2018.2.4 (Community Edition)
  • JRE: 1.8.0_152-release-1248-b8 amd64
  • JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o

I would appreciate it if you could tell me where the error is that does not generate the full installer
I look forward to your usual quick response

Regards,
oM

Anton Tananaev 7 years ago

Why do you need an installer?

oM 7 years ago

Hi Anton,

I have made some changes and customizations and I want to install them on my server (Ubuntu).
When installing the installer obtained the only thing that is displayed to me is:

  • conf
  • data
  • jre
  • lib
    -logs
  • schema
  • web
  • templates

I clarify that I only need the installer for linux-64 (Ubuntu)

I would appreciate it if you could tell me where the error is that does not generate the full installer
I look forward to your usual quick response

Regards,
oM

Anton Tananaev 7 years ago

If you made customisations, just deploy your customisations on the existing server instance. You don't need to create an installer.

oM 7 years ago

Hi Anton,
What would be the next steps? Because I have also modified the files that are inside src/org/traccar

Regards,
oM

Anton Tananaev 7 years ago

You need to compile JAR file and replace it on your server. That's pretty much it.

oM 7 years ago

Hi Anton,
Thanks for your suggestion, I already managed to compile the file tracker-server.jar with mvn package.
Before replacing the jar on my server, download the service with sudo /opt/traccar/bin/stopDaemon.sh, replace the jar and then upload the service with sudo /opt/traccar/bin/startDaemon.sh, apparently it went up correctly, but I do not have access to the Traccar UI (IPMYSERVER: 8082).

The logs that I get when I start the service are:
++++++++++ YAJSW SET ENV ++++++++++
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
...
OS   : Linux/4.15.0-34-generic/amd64
JVM  : Oracle Corporation/1.8.0_181//usr/lib/jvm/java-8-oracle/jre/64
************* STARTING traccar ***********************

Service traccar started

Sep 25, 2018 11:02:16 PM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Sep 25, 2018 11:02:17 PM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Sep 25, 2018 11:02:17 PM org.rzo.yajsw.os.posix.PosixService getPid
INFO: wrapper pid file: /run/wrapper.traccar.pid
Service traccar started

I look forward to your usual quick response
Regards,
oM

oM 7 years ago

Hi Anton,
Additional this is the logs when making a maven package

nando@nando-laptop:~/traccar$ mvn package
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[INFO] Scanning for projects...
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] Building traccar 4.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[WARNING] The POM for com.sun.xml.bind:jaxb-core:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[WARNING] The POM for com.sun.xml.bind:jaxb-impl:jar:2.2.11 is invalid, transitive dependencies (if any) will not be available, enable debug logging for more details
[INFO] 
[INFO] --- maven-checkstyle-plugin:3.0.0:check (checkstyle) @ traccar ---
[INFO] 
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-bytecode-version) @ traccar ---
[WARNING] Failed to build parent project for com.sun.xml.bind.mvn:jaxb-bundles:pom:2.2.11
...
[INFO] org.jxls:jxls:jar:2.4.6 already exists in destination.
[INFO] org.apache.velocity:velocity:jar:1.7 already exists in destination.
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 11.978 s
[INFO] Finished at: 2018-09-26T06:48:53-05:00
[INFO] Final Memory: 25M/90M
[INFO] ------------------------------------------------------------------------
Anton Tananaev 7 years ago

You need to check server logs. Are you building from git tag corresponding to release you are using? If not, you should.