Build fails in Windows - The system cannot find the path specified

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

This error happens when a build runs on a Windows machine:

error	11-Sep-2012 09:23:28	rollback completed
error	11-Sep-2012 09:23:29	abort: D:\Atlassian\Application_Data\Bamboo\xml-data\build-dir\ABC3TRUNK1-A3TRUNKABC-ATRUNKA3ABCDED\dir\A123465\temp\anotherdir\library\ABC\and\.hg/my\happy/path/to/some/huge/file/jaskasdasdasdasddjalksjdlaks_asdj1283012j123adk_123f12803093e1sdasdf2a7bi34fl23asdd4a09asd890.i: The system cannot find the path specified

Cause

This happens due to long plan keys and / or file names. Paths in Windows must not contain more than 260 characters (Read more). In the example above, the full path has 268 characters.

Resolution

Make sure to use shorter plan keys and file names, so that the path does not exceed 260 characters.

A good way to reduce the path length is to make the working directory path shorter.

Making the working directory shorter can be done following the steps below:

1. Edit the wrapper.conf file available in the {{$BAMBOO_INSTALL/conf}} directory and add the line below to allow changing the paths in Bamboo

wrapper.java.additional.X=-Dbamboo.paths.set.allowed=true

where X can be replaced with the next available digit in the list of Java parameters.

2. Edit the bamboo.cfg.xml file in the home directory and change the below line:

<property name="buildWorkingDir">${bambooHome} \xml-data\build-dir</property>

to a shorter absolute path such:

<property name="buildWorkingDir">C:\build-dir</property>

3. Restart Bamboo for the changes to take effect

Last modified on Jun 14, 2013

Was this helpful?

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