尝试配置netbeans项目时MojoExecutionException

时间:2016-01-03 19:59:59

标签: java netbeans

关于NetBeans错误跟踪器上的问题,大约有一百万个错误报告,但没有一个为我提供解决方案。

问题在于,当我尝试分析我的程序时,如下所示:

image description

我明白了:

cd C:\MYSELF\programing\java\AutoCall\AutoClient; "JAVA_HOME=C:\\Program Files\\Java\\jdk1.8.0_31" cmd /c "\"\"C:\\Users\\Jakub\\AppData\\Roaming\\NetBeans\\7.4\\maven\\bin\\mvn.bat\" -Dexec.args=\"-agentpath:C:/Users/Jakub/AppData/Roaming/NetBeans/7.4/lib/deployed/jdk16/windows-amd64/profilerinterface.dll=C:\\Users\\Jakub\\AppData\\Roaming\\NetBeans\\7.4\\lib,5140,10 -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\\MYSELF\\programing\\java\\AutoCall\\AutoClient\\nbproject\\private\\profiler  -classpath %classpath cz.autoclient.Main\" -Dexec.executable=\"C:\\Program Files\\Java\\jdk1.8.0_31\\bin\\java.exe\" -DnetbeansProjectMappings= -Dmaven.ext.class.path=C:\\Users\\Jakub\\AppData\\Roaming\\NetBeans\\7.4\\maven-nblib\\netbeans-eventspy.jar org.codehaus.mojo:exec-maven-plugin:1.2.1: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 Auto Client 3.0
------------------------------------------------------------------------

--- exec-maven-plugin:1.2.1:exec (default-cli) @ autoclient ---
Profiler Agent: Waiting for connection on port 5140, timeout 10 seconds (Protocol version: 14)
Profiler Agent Error: Timed out trying to establish connection with client
Profiler Agent: Initializing...
Profiler Agent: Options: >C:\Users\Jakub\AppData\Roaming\NetBeans\7.4\lib,5140,10<
Profiler Agent: Initialized successfully
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 12.012s
Finished at: Sun Jan 03 20:57:36 CET 2016
Final Memory: 5M/75M
------------------------------------------------------------------------
Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli) on project autoclient: 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

这个错误似乎是随机发生的 - 我有几次成功的分析会议,然后又发生了。

2 个答案:

答案 0 :(得分:0)

我遇到了同样的问题,当我尝试启动netbeans配置文件来分析内存时,我收到了以下消息:

无法在项目安全桌面上执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(default-cli):目标org.codehaus.mojo的参数'executable':exec- maven-plugin:1.2.1:exec缺失或无效 - &gt; [帮助1]

因此,为了运行de profile模式,我正常启动了应用程序,然后,我在currenty runnig主应用程序中进行了配置文件模式。

答案 1 :(得分:0)

增加超时时间。使用以下参数运行netbeans:

  

netbeans64.exe -J-Dprofiler.agent.connect.timeout = 60

请参阅https://blogs.oracle.com/nbprofiler/entry/tweaking_profiler_timeouts