The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bamboo remote agent build fails with JAVA exception.

mala lahon
November 13, 2012

My Bamboo remote agent is running in CentOS 64 bit. While executing the build for remote agent it fails with the following exception:

Starting to build 'ABCDEF-Remote - Remote Agent'

... running command line: /usr/bin/ant -f /home/user/bamboo-agent-home/xml-data/build-dir/ABCDEF-REMOTE/protected/tests/build.xml build

... in : /home/user/bamboo-agent-home/xml-data/build-dir/ABCDEF-REMOTE

... using java.home: /usr

... using extra environment variables: ANT_HOME=/usr/share/ant

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/tools/ant/launch/Launcher

Caused by: java.lang.ClassNotFoundException: org.apache.tools.ant.launch.Launcher

at java.net.URLClassLoader$1.run(URLClassLoader.java:202)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(URLClassLoader.java:190)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)

at java.lang.ClassLoader.loadClass(ClassLoader.java:247)

Could not find the main class: org.apache.tools.ant.launch.Launcher. Program will exit.

If I execute the remote agent command line directly in a shell on the CentOS machine running remote bamboo agent

/usr/bin/ant -f /home/user/bamboo-agent-home/xml-data/build-dir/ABCDEF-REMOTE/protected/tests/build.xml build,

the build works fine. Bamboo server is running in Windows server 32bit. Any pointer will be appreciated.

Thanks

2 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Answer accepted
mala lahon
November 14, 2012

I am thinking perhpas I should send the build command to bamboo remote agent as a shell command:

/bin/sh /usr/bin/ant -f /home/user/bamboo-agent-home/xml-data/build-dir/ABCDEF-REMOTE/protected/tests/build.xml build

At present Ant builder path for this remote agent is /usr .

Thx

0 votes
Przemek Bruski
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2012

If you run

export ANT_HOME=/usr/share/ant

/usr/bin/ant -f /home/user/bamboo-agent-home/xml-data/build-dir/ABCDEF-REMOTE/protected/tests/build.xml build

Does it still work?

mala lahon
November 14, 2012

Hi,

Thanks for your response.

As mentioned I can execute the above command locally in the CentOs machine running Bamboo remote agent and it runs fine.

In the remote agent machine

echo $ANT_HOME

/usr/share/ant

Issue here is when a build is triggered from the Bamboo server to the remote agent

TAGS
AUG Leaders

Atlassian Community Events