Stefan Goßner

Senior Escalation Engineer for SharePoint (WSS, SPS, MOSS, SP2010) and MCMS

MOSS - Common Issue - Content Deployment fails with "Failed to compare two elements in the array."

MOSS - Common Issue - Content Deployment fails with "Failed to compare two elements in the array."

  • Comments 29
  • Likes

A common problem we see with content deployment and with STSADM -o export is the error message below:

[4/11/2008 9:25:01 AM]: FatalError: Failed to compare two elements in the array.
   at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.Sort[TValue](T[] keys, TValue[] values, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Collections.Generic.ArraySortHelper`1.Sort(T[] items, Int32 index, Int32 length, IComparer`1 comparer)
   at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)
...
*** Inner exception:
Object reference not set to an instance of an object.
   at Microsoft.SharePoint.SPFeature.EnsureProperties()
   at Microsoft.SharePoint.SPFeature.get_TimeActivated()
   at Microsoft.SharePoint.Deployment.WebSerializer.ExportFeatureComparer.System.Collections. Generic.IComparer<Microsoft.SharePoint.Deployment.ExportObject>.Compare(ExportObject exportObject1, ExportObject exportObject2)
   at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)

The usual reason for this problem is that some sites in the site collection have features assigned where the feature is not installed in the server farm. The main problem here is that you cannot easily identify which features are missing as the missing features are not reported in the error message.

To overcome this problem I have written a tool which allows to identify all features used in a site collection which are missing on the server: WssAnalyzeFeatures.

To resolve the problem you then have to install the identified missing features on the exporting server. In case that this is not possible you have to remove the features from the site colleciton or the affected sites. Usually this can be done using STSADM -o deactivatefeature but sometimes fails if the feaure definition is not installed on the server. In this case you can use WssRemoveFeatureFromSite.

Comments
  • [ Part 1 - Part 2 - Part 3 - Part 4 - Part 5 - Part 6 ] Requirements for a successful content deployment

  • Sorry about the title

    how do i install/run your wssanalyzefeatures.exe?

    is there any documentation?

  • Hi Val,

    please click on the link for the tool and check the page. The Usage is listed.

    Cheers,

    Stefan

  • how do you set your server for this tool?

  • Hi Skillmaster,

    you have to run the tool on the server itself.

    You cannot run it from remote.

    Cheers,

    Stefan

  • any other ideas, when I run WssAnalyzeFeatures, there are no errors.. when I run Export against the top level site if fails with the "Failed to compare ..." msg. I can run it successfully against all subsites ?

  • Hi Li,

    is the callstack identical to the one listed above?

    And there is no error reported in the FeatureProblems.txt file?

    I haven't seen this till now.

    I would suggest to open a support case with Microsoft to get this analyzed.

    Cheer,

    Stefan

  • Hi Stefan,

    Well actually looking at the stack again its not identical...

    [5/30/2008 1:59:44 PM]: FatalError: Failed to compare two elements in the array.

      at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)

      at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)

      at System.Collections.Generic.ArraySortHelper`1.Sort[TValue](T[] keys, TValue[] values, Int32 index, Int32 length, IComparer`1 comparer)

      at System.Collections.Generic.ArraySortHelper`1.Sort(T[] items, Int32 index, Int32 length, IComparer`1 comparer)

      at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)

      at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer)

      at System.Collections.Generic.List`1.Sort(IComparer`1 comparer)

      at Microsoft.SharePoint.Deployment.WebSerializer.GetDataFromObjectModel(Object obj, SerializationInfo info, StreamingContext context)

      at Microsoft.SharePoint.Deployment.DeploymentSerializationSurrogate.GetObjectData(Object obj, SerializationInfo info, StreamingContext context)

      at Microsoft.SharePoint.Deployment.XmlFormatter.SerializeObject(Object obj, ISerializationSurrogate surrogate, String elementName, Boolean bNeedEnvelope)

      at Microsoft.SharePoint.Deployment.XmlFormatter.Serialize(Stream serializationStream, Object topLevelObject)

      at Microsoft.SharePoint.Deployment.ObjectSerializer.Serialize(DeploymentObject deployObject, Stream serializationStream)

      at Microsoft.SharePoint.Deployment.SPExport.SerializeObjects()

      at Microsoft.SharePoint.Deployment.SPExport.Run()

    *** Inner exception:

    Value does not fall within the expected range.

      at Microsoft.SharePoint.SPSecurity.ValidateSecurityOnOperation(SPOperationCode code, ISecurableObject obj)

      at Microsoft.SharePoint.SPFeature.EnsureProperties()

      at Microsoft.SharePoint.SPFeature.get_TimeActivated()

      at Microsoft.SharePoint.Deployment.WebSerializer.ExportFeatureComparer.System.Collections.Generic.IComparer<Microsoft.SharePoint.Deployment.ExportObject>.Compare(ExportObject exportObject1, ExportObject exportObject2)

      at System.Collections.Generic.ArraySortHelper`1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)

    [5/30/2008 1:59:44 PM]: Progress: Export Completed.

    [5/30/2008 1:59:44 PM]: Finish Time: 5/30/2008 1:59:44 PM.

    [5/30/2008 1:59:44 PM]: Completed with 0 warnings.

    [5/30/2008 1:59:44 PM]: Completed with 1 errors.

    have you seen anything like this before ?

  • Hi Li,

    please open a support case to get this analyzed.

    Cheers,

    Stefan

  • HI Stefan,

    I have a feature, that is not installed on one of two farms. how is the updatepath for the second farm to update in that way, that both are equal?!

    Please let me know.

    the feature, that is missing is called "S2SiteAdmin".

    Please le mw know, in cause of a customerneedance for a running CD..

    Thanks and bye for now,

    jack

  • Hi Jack,

    that means that both servers are on different hotfix levels.

    You need to ensure that both servers are on the same hotfix level.

    Cheers,

    Stefan

  • Hi Stefan,

    I have a similar problem when trying to perform a content deployment between 2 seperate farms. The error I get is as follow:

    <ReportMessage Title="Could not find Feature S2SiteAdmin. at Microsoft.SharePoint.Deployment.ImportRequirementsManager.VerifyFeatureDefinition(SPRequirementObject reqObj) at Microsoft.SharePoint.Deployment.ImportRequirementsManager.Validate(SPRequirementObject reqObj) at Microsoft.SharePoint.Deployment.ImportRequirementsManager.DeserializeAndValidate() at Microsoft.SharePoint.Deployment.SPImport.VerifyRequirements() at Microsoft.SharePoint.Deployment.SPImport.Run()" Time="2008-08-18T19:15:18.5846804Z" Severity="Error" Phase="ImportInProgress" />

     <ReportMessage Title="Content deployment job 'Remote import job for job with sourceID = 20eca940-3a65-4804-bb75-f45fef4af181' failed.The exception thrown was 'Microsoft.SharePoint.SPException' : 'Could not find Feature S2SiteAdmin.'" Time="2008-08-18T19:15:19.8034304Z" Severity="Error" Description="" Recommendation="" Phase="ImportInProgress" />

     </ArrayOfReportMessage>

    I do not seem to find much on the net for this. Let me know if you have seen this.

    Thanks

    Richard

  • Hi Richard,

    this will happen if the hotfix level of the target farm is lower than the hotfix level of the source farm.

    Please keep the hotfix level in sync between the different farms to avoid such problems.

    Cheers,

    Stefan

  • Hi Stefan,

    I have also faced the error "S2SiteAdmin". However, I try to export the site from web application A and import to web application B in the same farm.

    This seems that the error "S2SiteAdmin" is not related to hotfix level.

    Thanks.

    Regards,

    Ken

  • Hi Ken,

    your specific issue seems to be different. Has the database been moved to a different farm using backup/restore?

    Because it seems as if some of the MOSS features coming with the product are missing on the file system.

    Cheers,

    Stefan

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment