locked
Cannot create the label RRS feed

  • Question

  • I am working on somebody else's build script. I got this error at the end of build, and I don't even know which task triggered this error. The build seems finished ok.



    </build>
      <exception><![CDATA[Microsoft.TeamFoundation.VersionControl.Client.LabelDuplicateItemException: TF203007: Cannot create the label because the version controlled item $/Students Finance System/Release 9.6/7 Utilities/WipConverter already exists or has been specified more than once. ---> System.Web.Services.Protocols.SoapException: TF203007: Cannot create the label because the version controlled item $/Students Finance System/Release 9.6/7 Utilities/WipConverter already exists or has been specified more than once.
       --- End of inner exception stack trace ---
       at Microsoft.TeamFoundation.VersionControl.Client.Repository.ProcessHttpResponse(HttpWebResponse response, Stream responseStream, WebException webException, XmlReader& xmlResponseReader)
       at Microsoft.TeamFoundation.VersionControl.Client.Repository.ExecWebServiceRequest(HttpWebRequest request, XmlWriter requestXml, String methodName, HttpWebResponse& response)
       at Microsoft.TeamFoundation.VersionControl.Client.Repository.LabelItem(String workspaceName, String workspaceOwner, VersionControlLabel label, LabelItemSpec[] labelSpecs, LabelChildOption children, Failure[]& failures)
       at Microsoft.TeamFoundation.VersionControl.Client.VersionControlServer.CreateLabel(VersionControlLabel label, LabelItemSpec[] itemSpecs, LabelChildOption options)
       at ThoughtWorks.CruiseControl.Core.Sourcecontrol.Vsts.LabelSourceControl(IIntegrationResult result)
       at ThoughtWorks.CruiseControl.Core.Sourcecontrol.MultiSourceControl.LabelSourceControl(IIntegrationResult result)
       at ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult result)]]></exception>
    </cruisecontrol>



    <cruisecontrol>
    <project name="Build_SFS_Current" >
      <webURL>http://SFSBuildMaster/ccnet/</webURL>
      <triggers>
        <intervalTrigger name="continuous" seconds="99999999999" />
      </triggers>
     
      <modificationDelaySeconds>0</modificationDelaySeconds>
      <labeller type="defaultlabeller">
       <prefix>9.7.</prefix>
       <incrementOnFailure>false</incrementOnFailure>
      </labeller>
      <sourcecontrol type="multi">
       <sourceControls>
        <vsts autoGetSource="true" applyLabel="false">
         <server>http://edm-team-1a:8080</server>
         <project>$/Students Finance System/BuildScripts/SFS/Current</project>
         <workingDirectory>C:\BuildScripts2\SFS\Current</workingDirectory>
         <cleanCopy>false</cleanCopy>
         <workspace>SFS_BuildScripts2_Current_SFSBuildMaster</workspace>
         <deleteWorkspace>false</deleteWorkspace>
        </vsts>   
        <vsts autoGetSource="true" applyLabel="true">
         <server>http://edm-team-1a:8080</server>
         <project>$/Students Finance System/Release 9.6</project>
         <workingDirectory>c:\SFSBuildsDevelopment\SFS_Current</workingDirectory>
         <cleanCopy>false</cleanCopy>
         <workspace>SFS_Current_SFSBuildMaster</workspace>
         <deleteWorkspace>false</deleteWorkspace>
        </vsts>
       </sourceControls>
      </sourcecontrol>  
      <tasks>
       <exec>
        <executable>xcopy</executable>
        <buildArgs>/q /r /y "c:\SFSBuildsDevelopment\SFS_Current\6 DEPLOYMENT\Configurator\configurator.xml" C:\BuildScripts2\SFS\Current</buildArgs>
       </exec>  
       <FinalBuilder>   
        <ProjectFile>C:\BuildScripts2\SFS\Current\SFS.Build.fbz6</ProjectFile>
        <FBVersion>6</FBVersion>
        <ShowBanner>false</ShowBanner>
        <FBVariables>
         <FBVariable name="CompileConfig" value="Debug" />
         <FBVariable name="CurrentDir" value="C:\SFSBuildsDevelopment\SFS_Current" />
         <FBVariable name="BuildDir" value="C:\SFSBuildsDevelopment\Builds" />
         <FBVariable name="SFSFolderName" value="SFS_Current" />
        </FBVariables>
        <Timeout>3600</Timeout>
        <DontWriteToLog>true</DontWriteToLog>
       </FinalBuilder>
       <FinalBuilder>
        <ProjectFile>C:\BuildScripts2\SFS\Current\SFS.Build.fbz6</ProjectFile>
        <FBVersion>6</FBVersion>
        <ShowBanner>false</ShowBanner>
        <FBVariables>
         <FBVariable name="CompileConfig" value="Release" />
         <FBVariable name="CurrentDir" value="C:\SFSBuildsDevelopment\SFS_Current" />
         <FBVariable name="BuildDir" value="C:\SFSBuildsDevelopment\Builds" />
         <FBVariable name="SFSFolderName" value="SFS_Current" />
        </FBVariables>
        <Timeout>3600</Timeout>
        <DontWriteToLog>true</DontWriteToLog>
       </FinalBuilder>
       <nant>
        <executable>C:\Tools\nant\bin\nant.exe</executable>
        <baseDirectory>C:\BuildScripts2\SFS\Current</baseDirectory>
        <buildArgs>-D:CurrentDir="C:\SFSBuildsDevelopment\SFS_Current" -D:SFSPrefix="SFS_Current"</buildArgs>
        <buildFile>SFSDeploy.build</buildFile>  
        <targetList>
         <target>SetCurrentDirNameToAssemblyFileVersion</target>
        </targetList>
        <buildTimeoutSeconds>3000</buildTimeoutSeconds>
       </nant>
      </tasks>
    Jirong
    Tuesday, June 9, 2009 2:50 PM

Answers

  • I've exactly this error, and when I reported to microsoft they said this exception is "AS DESIGN". This error is cause by one of your developer was deleted file and added exactly same file back in instead using undeleted feature, and in the backend database, TFS give this file new file id which has exactly same server path; therefore, when you are trying to label, it throws an exception which complaining file already existed. To work around this issue, you have to manually open label and remove $/Students Finance System/Release 9.6/7 Utilities/WipConverter. Then you should be able to label again.

    Microsoft Support Case SRX081209601446


    Best Regards,
    • Proposed as answer by AndyPham Wednesday, June 24, 2009 4:25 PM
    • Marked as answer by Hua Chen Thursday, June 25, 2009 8:59 AM
    Monday, June 22, 2009 5:47 PM

All replies

  • Hello,

    Looks like whatever items Cruise Control is passing into the CreateLabel API is sending a duplicate item that is causing the label to fail.  Can you tell from the history for the item that failed ($/Students Finance System/Release 9.6/7 Utilities/WipConverter), if it was deleted, renamed, or readded after a delete?


    Matthew Mitrik | Program Manager | TFS | Version Control | Migration | Twitter
    Wednesday, June 10, 2009 3:16 PM
    Moderator
  • Interesting timing for this problem.  I am seeing the same kind of error and in my case I did indeed (manually) rename, remove, and then re-add the path.  Is there any way to remedy this?

    I had branched without realizing that the branch had renamed the folder with a "-branch" suffix.  I renamed that to correct it for my build script mapping.

    I subsequently found that I had branched the wrong version so I deleted the folder and then branched again.  I thought I was home free.   The component test build completed successfully but when I did a build all which labels, now I get this error.

    Richard

    *** Feeling particularly stupid today ***

    Wednesday, June 17, 2009 4:38 PM
  • I've exactly this error, and when I reported to microsoft they said this exception is "AS DESIGN". This error is cause by one of your developer was deleted file and added exactly same file back in instead using undeleted feature, and in the backend database, TFS give this file new file id which has exactly same server path; therefore, when you are trying to label, it throws an exception which complaining file already existed. To work around this issue, you have to manually open label and remove $/Students Finance System/Release 9.6/7 Utilities/WipConverter. Then you should be able to label again.

    Microsoft Support Case SRX081209601446


    Best Regards,
    • Proposed as answer by AndyPham Wednesday, June 24, 2009 4:25 PM
    • Marked as answer by Hua Chen Thursday, June 25, 2009 8:59 AM
    Monday, June 22, 2009 5:47 PM
  • Hi Andy,

    Thanks for sharing the info.

    Catherine Sea
    http://www.scmsoftwareconfigurationmanagement.com
    Tuesday, June 23, 2009 7:29 AM
  • A very easy workaround (if it's allowed in your case) to resolve this error mesg is (especially when everybody is standing behind you to fix this issue on urgent basis):

    - Just change the buildnumber.txt file (The file which holds the last successful buildnumber "number" in it) and bump the number to a new value i.e. if you are getting an error that TFS>. ... can't label ... file and during that build time the build label that TFS was trying to apply (lets say) is : TFS_RELEASE_BUILD_5, then, just bump the build number to 10 or 20 or 50, i.e. the next build number your build script will generate automatically will be either 11, 21 or 51.

    Problem resolved.

     

    My case:

    1. I created a branch "11.0" sometime 2 weeks back. On this branch, we created builds from 1 to 10. Build label was in format: TUD_COR_11.0.0.1 ..to 10.

    2. Yesterday, I deleted 11.0 branch.

    3. Yesterday, we had to recreate this branch again from a new source branch so what we did was:

       a. deleted 11.0 branch. checked in the change so branch is gone now.

       b. Deleted all the builds that were created by the build defintion and finally deleted the build definition (as other team members wanted me to create a new build definition for the new 11.0 branch (to be created from a new source branch) again from scratch. While creating the build definitions, I successfully saw the "tick" marks against labels/etc/anything related to existing build definitions were going to delete as per the Delete operation.

    4. Now I created new 11.0 branch again from latest data from the source branch as of today.

    5. Created the build definitions again.

    6. Created COR build again with build label TUD_COR_11.0.0.1. Now TFS gave me the similar "error mesg" as mentioned in the thread above.

     

    Possible resolution:

    A. Delete the file "as per the build log" where TFS Label operation is failing. You can use sidekick -OR TF label command. Note: This can be time consuming as what if you delete the label from the file (OR delete this file under this label i.e. this label is not applied to this label anymore).

       ******NOTE: Here we are NOT deleting the file from source control. ***** just removing the file from the label concept

    B.  OR just increase the buildnumber.txt .. that the build script uses to generate the build label i.e. if my buildnumber.txt (which is somewhere in the source control branch tree), it contained a value of "0" and it was creating build "1" with label: TUD_COR_11.0.0.1 (where branch is 11.0 and build series is 11.0.0.1) i.e. <Major>.<minor>.<Iterationofthisbuild>.<buildnumber> format. Now if I just change the value of this buildnumber.txt to "10" (why as that was the last build number we successfully created when we HAD 11.0 branch earlier (before we deleted it).. so I bumped the buildnumber value to 10 i.e. now if I run the build definition again (i.e. queue the build), build script will generate a new build with number: 11 i.e. with build label "TUD_COR_11.0.0.11". Problem solved in few SECONDS here. Nobody in the company raised any doubts in doing this as this was a development branch so they didn't care what build number we(SCM team) are providing to them. They just wanted a successful build.

     

    Arun

     

    Friday, February 4, 2011 6:17 PM