Build fails in Windows - The system cannot find the path specified
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
This error happens when a build runs on a Windows machine:
1
2
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
1
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:
1
<property name="buildWorkingDir">${bambooHome} \xml-data\build-dir</property>
to a shorter absolute path such:
1
<property name="buildWorkingDir">C:\build-dir</property>
3. Restart Bamboo for the changes to take effect
Was this helpful?