Error while executing project in Netbeans

Turbovix5 years ago

Hi Anton
I need help to understand why I can not run the project on Netbeans, as it displays the message below.

Note that when I try to run Intellij everything works fine, remembered that in Netbeans I put the argument "debug.xml" and even then it does not execute.

Another question, in Intellij after building the project it does not generate the "tracker-server.jar" in the "target" folder so it is not possible to package using the "package.sh" script, how do I solve this?

Thank you

cd /home/mtorres/IdeaProjects/traccar-4.2; JAVA_HOME=/usr/lib/jvm/java-10-openjdk-10.0.2.13-7.fc29.x86_64 /home/mtorres/netbeans/java/maven/bin/mvn "-Dexec.args=-classpath %classpath org.traccar.Main" -Dexec.executable=/usr/lib/jvm/java-10-openjdk-10.0.2.13-7.fc29.x86_64/bin/java org.codehaus.mojo:exec-maven-plugin:1.5.0:exec
Running NetBeans Compile On Save execution. Phase execution is skipped and output directories of dependency projects (with Compile on Save turned on) will be used instead of their jar artifacts.
Scanning for projects...
                                                                        
------------------------------------------------------------------------
Building traccar 4.2-SNAPSHOT
------------------------------------------------------------------------
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
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

--- exec-maven-plugin:1.5.0:exec (default-cli) @ traccar ---
Exception in thread "main" java.lang.RuntimeException: Configuration file is not provided
    at org.traccar.Main.main(Main.java:79)
Command execution failed.
org.apache.commons.exec.ExecuteException: Process exited with an error: 1 (Exit value: 1)
    at org.apache.commons.exec.DefaultExecutor.executeInternal(DefaultExecutor.java:404)
    at org.apache.commons.exec.DefaultExecutor.execute(DefaultExecutor.java:166)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:764)
    at org.codehaus.mojo.exec.ExecMojo.executeCommandLine(ExecMojo.java:711)
    at org.codehaus.mojo.exec.ExecMojo.execute(ExecMojo.java:289)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 2.575 s
Finished at: 2018-11-16T09:40:45-02:00
Final Memory: 12M/44M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.5.0:exec (default-cli) on project traccar: Command execution failed. Process exited with an error: 1 (Exit value: 1) -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Anton Tananaev5 years ago

I don't use NetBeans, so I won't be able to help you. As for building JAR file, just use maven directly.

Turbovix5 years ago

Thank you, now I'm going to be alone with Intellij!

gustavofarias5 years ago

Are you trying something like this?

alt text

I recommend you to clean and build first, so maven can download all the dependencies.

Turbovix5 years ago

It turns out I was using Netebeans Apache 9.0, and it depends on version 10 of OpenJDK, hence the problem runs at the time of executing the project.
The problem happens even though I am cleaning and rebuilding the project.

Now I'm enjoying Intellij so much that I no longer have installed Netbeans in my Fedora.

Thank you for your feedback!