Bamboo java.lang.NullPointerException: Builder path is not defined

I am getting this exception during my build of a java project. I am using Ant 1.8.2 and have ANT_HOME enviornment variable set as well as %ANT_HOME%\bin on my Path environment variable. I'm using Windows 2008 R2. How is this bug resolved?

java.lang.NullPointerException: Builder path is not defined at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:204) at com.atlassian.bamboo.plugins.ant.task.AntConfig.<init>(AntConfig.java:66) at com.atlassian.bamboo.plugins.ant.task.AntBuildTask.execute(AntBuildTask.java:64) at com.atlassian.bamboo.task.TaskExecutorImpl.executeTasks(TaskExecutorImpl.java:183) at com.atlassian.bamboo.task.TaskExecutorImpl.execute(TaskExecutorImpl.java:91) at com.atlassian.bamboo.build.pipeline.tasks.ExecuteBuildTask.call(ExecuteBuildTask.java:85) at sun.reflect.GeneratedMethodAccessor608.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.interceptor.ExposeInvocationInterceptor.invoke(ExposeInvocationInterceptor.java:89) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy722.call(Unknown Source) at sun.reflect.GeneratedMethodAccessor608.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:304) at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149) at org.springframework.orm.hibernate.HibernateInterceptor.invoke(HibernateInterceptor.java:117) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at $Proxy723.call(Unknown Source) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent.build(DefaultBuildAgent.java:204) at com.atlassian.bamboo.v2.build.agent.BuildAgentControllerImpl.waitAndPerformBuild(BuildAgentControllerImpl.java:103) at com.atlassian.bamboo.v2.build.agent.DefaultBuildAgent$1.run(DefaultBuildAgent.java:109) at com.atlassian.bamboo.build.pipeline.concurrent.NamedThreadFactory$2.run(NamedThreadFactory.java:52) at java.lang.Thread.run(Unknown Source)

3 answers

Hi Freddy,

Are you using local or remote agents to build your plan? Can you please confirm that you have ANT executable configured with a correct path for your Bamboo server as per this document and that you have the ANT capability configured for the agent that runs your plan?

If you still confront the same problem, please open a support ticket and provide your Bamboo server log file, plan key of the problematic plan, and screenshots of your Ant executable configuration and ANT task configuration pages. What is the problematic plan key?

Cheers,
Armen

I was using local agent to do this. Ant was configured properly. The workaround for me was to delete the build plan and create a new one. I don't see the exception anymore.

Faced same issue, but with Maven 3 on local build agent. Fixed by removing Maven 3 task and creation again same. Another fix - just open task and save it.

How to reproduce issue: change path to Maven 3 executable at server capabilities, it would break all existing tasks based on that builder.

I ran into this today as well when I was setting up some new agents. Frederick's suggestion of deleting and re-creating all Maven steps in the plan worked to fix it. 

 

Later I discovered that disabling the task, running the build, and re-enabling the task worked as well. 

Suggest an answer

Log in or Join to answer
Community showcase
Renan Battaglin
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,096 views 0 5
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot