Bamboo remote agent build fails with JAVA exception.

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:


at Method)


at java.lang.ClassLoader.loadClass(

at sun.misc.Launcher$AppClassLoader.loadClass(

at java.lang.ClassLoader.loadClass(

Could not find the main class: 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.


2 answers

1 accepted

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 .


0 vote

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?


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


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

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published May 18, 2017 in Bamboo

FAQ: How to Upgrade Bamboo Server

Bamboo 5.9 will no longer be supported after June 12, 2017. What does this mean? As part of our End of Life policy, Atlassian supports major versions for two years after the first major iteratio...

1,561 views 0 6
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you