ArrayIndexOutOfBoundsException when building with msbuilder

Symptoms

When bamboo executes a MSBuild plan the build log shows the following error;

Failed to execute the build 'MY-BUILD-42'
java.lang.ArrayIndexOutOfBoundsException: 1
at com.atlassian.bamboo.plugin.builder.nant.AbstractDotNetBuilder.getEnvironmentSetting(AbstractDotNetBuilder.java:360)
at com.atlassian.bamboo.command.Command.executeCommand(Command.java:61)

Cause

If the plan's builder configuration sets a variable like PATH=C:\bea\;%PATH% the existing Path variable is overridden.

Resolution

  1. Delete this variable from the build configuration and try re-running the plan.
  2. Substitute %PATH% with ${system.PATH}

Last modified on Nov 21, 2012

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.