Can't build project Follow
Hello.
I try to build project with the TC 6.5 EAP (build 17521) with maven. But I have an exception.
[10:22:15]: [com.iqmen:server] [INFO] Compiling 1650 source files to /work/buildagent/work/iqbuzz_int/server/target/classes
[10:22:15]: [com.iqmen:server] Fatal error compiling
[10:22:15]: [INFO] ------------------------------------------------------------------------
[10:22:15]: [ERROR] BUILD ERROR
[10:22:15]: [INFO] ------------------------------------------------------------------------
[10:22:15]: [INFO] Fatal error compiling
[10:22:15]: Embedded error: Error while executing the external compiler.
[10:22:15]: java.io.IOException: error=2, No such file or directory
[10:22:15]: [INFO] ------------------------------------------------------------------------
[10:22:15]: [INFO] Trace
[10:22:15]: org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
[10:22:15]: at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
[10:22:15]: at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
[10:22:15]: at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
[10:22:15]: at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
[10:22:15]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:22:15]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[10:22:15]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[10:22:15]: at java.lang.reflect.Method.invoke(Method.java:597)
[10:22:15]: at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
[10:22:15]: at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[10:22:15]: at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
[10:22:15]: at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[10:22:15]: Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
[10:22:15]: at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:498)
[10:22:15]: at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
[10:22:15]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
[10:22:15]: ... 17 more
[10:22:15]: Caused by: org.codehaus.plexus.compiler.CompilerException: Error while executing the external compiler.
[10:22:15]: at org.codehaus.plexus.compiler.javac.JavacCompiler.compileOutOfProcess(JavacCompiler.java:343)
[10:22:15]: at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:137)
[10:22:15]: at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
[10:22:15]: ... 20 more
[10:22:15]: Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error while executing process.
[10:22:15]: at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:679)
[10:22:15]: at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:69)
[10:22:15]: at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:56)
[10:22:15]: at org.codehaus.plexus.compiler.javac.JavacCompiler.compileOutOfProcess(JavacCompiler.java:337)
[10:22:15]: ... 22 more
[10:22:15]: Caused by: java.io.IOException: Cannot run program "javac" (in directory "/work/buildagent/work/iqbuzz_int/server"): java.io.IOException: error=2, No such file or directory
[10:22:15]: at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
[10:22:15]: at java.lang.Runtime.exec(Runtime.java:593)
[10:22:15]: at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:674)
[10:22:15]: ... 25 more
[10:22:15]: Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
[10:22:15]: at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
[10:22:15]: at java.lang.ProcessImpl.start(ProcessImpl.java:65)
[10:22:15]: at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
[10:22:15]: ... 27 more
[10:22:15]: [com.iqmen:server] Fatal error compiling
[10:22:15]: [INFO] ------------------------------------------------------------------------
[10:22:15]: [ERROR] BUILD ERROR
[10:22:15]: [INFO] ------------------------------------------------------------------------
[10:22:15]: [INFO] Fatal error compiling
[10:22:15]: Embedded error: Error while executing the external compiler.
[10:22:15]: java.io.IOException: error=2, No such file or directory
[10:22:15]: [INFO] ------------------------------------------------------------------------
[10:22:15]: [INFO] Trace
[10:22:15]: org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
[10:22:15]: at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
[10:22:15]: at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
[10:22:15]: at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
[10:22:15]: at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
[10:22:15]: at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[10:22:15]: at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[10:22:15]: at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[10:22:15]: at java.lang.reflect.Method.invoke(Method.java:597)
[10:22:15]: at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
[10:22:15]: at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[10:22:15]: at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
[10:22:15]: at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
[10:22:15]: Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
[10:22:15]: at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:498)
[10:22:15]: at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
[10:22:15]: at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
[10:22:15]: at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
[10:22:15]: ... 17 more
[10:22:15]: Caused by: org.codehaus.plexus.compiler.CompilerException: Error while executing the external compiler.
[10:22:15]: at org.codehaus.plexus.compiler.javac.JavacCompiler.compileOutOfProcess(JavacCompiler.java:343)
[10:22:15]: at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:137)
[10:22:15]: at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
[10:22:15]: ... 20 more
[10:22:15]: Caused by: org.codehaus.plexus.util.cli.CommandLineException: Error while executing process.
[10:22:15]: at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:679)
[10:22:15]: at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:69)
[10:22:15]: at org.codehaus.plexus.util.cli.CommandLineUtils.executeCommandLine(CommandLineUtils.java:56)
[10:22:15]: at org.codehaus.plexus.compiler.javac.JavacCompiler.compileOutOfProcess(JavacCompiler.java:337)
[10:22:15]: ... 22 more
[10:22:15]: Caused by: java.io.IOException: Cannot run program "javac" (in directory "/work/buildagent/work/iqbuzz_int/server"): java.io.IOException: error=2, No such file or directory
[10:22:15]: at java.lang.ProcessBuilder.start(ProcessBuilder.java:460)
[10:22:15]: at java.lang.Runtime.exec(Runtime.java:593)
[10:22:15]: at org.codehaus.plexus.util.cli.Commandline.execute(Commandline.java:674)
[10:22:15]: ... 25 more
[10:22:15]: Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory
[10:22:15]: at java.lang.UNIXProcess.<init>(UNIXProcess.java:148)
[10:22:15]: at java.lang.ProcessImpl.start(ProcessImpl.java:65)
[10:22:15]: at java.lang.ProcessBuilder.start(ProcessBuilder.java:453)
[10:22:15]: ... 27 more
If I call mvn in console - it's ok. But through buildagent - it's failed. BuildAgent is started at the ROOT-user.
Where I have done an error?
Please sign in to leave a comment.
Hi
Try to interactively logon to account used by TeamCity agent, and start Maven from there.
It seems the account doens't have access to JDK.
Michael
TeamCity and BuildAgent is working under CentOs. System manager shows that BuildAgent process is working fromm root account.
But when build process started it prints
But we added PATH_TO_JDK_BIN folder to path in environment.
How can I define what account BuildAgent worked under?
We have found files in TEMP folder where is written environment variables. Where were they taken from?
After restartint the server these files were refershed :(
Please can someone reply to this..
I'm having a similar problem.