Can't build project

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

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?



4 comments
Comment actions Permalink

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

0
Comment actions Permalink

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

[17:11:58]: PATH = /work/maven2/bin:/sbin:/usr/sbin:/bin:/usr/bin

But we added PATH_TO_JDK_BIN folder to path in environment.
How can I define what account BuildAgent worked under?

0
Comment actions Permalink

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 :(

0
Comment actions Permalink

Please can someone reply to this..

I'm having a similar problem.

[com.rbsfm.torrentfx:torrentfx-dsa] [INFO] [clean:clean {execution: default-clean}]
[13:54:01]: [com.rbsfm.torrentfx:torrentfx-dsa] [INFO] Deleting directory /opt/app/ecomm/tools/CI/TeamCity/buildAgent/work/d56995e97823b2f8/target
[13:54:02]: [com.rbsfm.torrentfx:torrentfx-dsa] [debug] execute contextualize
[13:54:02]: [com.rbsfm.torrentfx:torrentfx-dsa] [INFO] [resources:resources {execution: default-resources}]
[13:54:02]: [com.rbsfm.torrentfx:torrentfx-dsa] [INFO] Using 'UTF-8' encoding to copy filtered resources.
[13:54:02]: [com.rbsfm.torrentfx:torrentfx-dsa] [INFO] Copying 1 resource
[13:54:02]: [com.rbsfm.torrentfx:torrentfx-dsa] [INFO] Copying 21 resources
[13:54:03]: [com.rbsfm.torrentfx:torrentfx-dsa] [INFO] [compiler:compile {execution: default-compile}]
[13:54:03]: [com.rbsfm.torrentfx:torrentfx-dsa] [INFO] Compiling 52 source files to /opt/app/ecomm/tools/CI/TeamCity/buildAgent/work/d56995e97823b2f8/target/classes
[13:54:03]: [com.rbsfm.torrentfx:torrentfx-dsa] Fatal error compiling
[13:54:03]: [Step 1/3] [INFO] ------------------------------------------------------------------------
[13:54:03]: [Step 1/3] [ERROR] BUILD ERROR
[13:54:03]: [Step 1/3] [INFO] ------------------------------------------------------------------------
[13:54:03]: [Step 1/3] [INFO] Fatal error compiling
[13:54:03]: [Step 1/3] Embedded error: Error while executing the external compiler.
[13:54:03]: [Step 1/3] java.io.IOException: error=2, No such file or directory
[13:54:03]: [Step 1/3] [INFO] ------------------------------------------------------------------------
[13:54:03]: [Step 1/3] [INFO] Trace
[13:54:03]: [Step 1/3] org.apache.maven.lifecycle.LifecycleExecutionException: Fatal error compiling
[13:54:03]: [Step 1/3]      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:703)
[13:54:03]: [Step 1/3]      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540)
[13:54:03]: [Step 1/3]      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:519)
[13:54:03]: [Step 1/3]      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371)
[13:54:03]: [Step 1/3]      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332)
[13:54:03]: [Step 1/3]      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181)
[13:54:03]: [Step 1/3]      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:356)
[13:54:03]: [Step 1/3]      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:137)
[13:54:03]: [Step 1/3]      at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
[13:54:03]: [Step 1/3]      at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:41)
[13:54:03]: [Step 1/3]      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[13:54:03]: [Step 1/3]      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[13:54:03]: [Step 1/3]      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[13:54:03]: [Step 1/3]      at java.lang.reflect.Method.invoke(Method.java:597)
[13:54:03]: [Step 1/3]      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
[13:54:03]: [Step 1/3]      at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
[13:54:03]: [Step 1/3]      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
[13:54:03]: [Step 1/3]      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

0

Please sign in to leave a comment.