“Failed to compare two elements in the array” Error During SPExport.Run

I’ve made a custom SPExport and SPImport tool that duplicates site content around the SharePoint site collection. However, it would suddenly run with no visible effects (no content was copied). After digging around the ULS logs (using the excellent log library provided by Ayman el-Hattab) I found out that SharePoint SPExport.Run() method was throwing a strange exception:

Failed to compare two elements in the array. at System.Collections.Generic.ArraySortHelper1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer1 comparer) at System.Collections.Generic.ArraySortHelper1.Sort[TValue](T[] keys, TValue[] values, Int32 index, Int32 length, IComparer1 comparer) at System.Collections.Generic.ArraySortHelper1.Sort(T[] items, Int32 index, Int32 length, IComparer1 comparer) at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer1 comparer) at System.Collections.Generic.List1.Sort(Int32 index, Int32 count, IComparer1 comparer) at System.Collections.Generic.List1.Sort(IComparer1 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: Failed to find the XML file at location '12TemplateFeaturesMyFeaturefeature.xml' at Microsoft.SharePoint.SPXmlDocCache.GetGlobalXmlDocumentCore(String pathXml, Boolean bFeature) at Microsoft.SharePoint.SPXmlDocCache.GetGlobalXmlDocument(String pathAllFeaturesRelativeXml) at Microsoft.SharePoint.Administration.SPFeatureDefinition.EnsureGlobalDefinition() at Microsoft.SharePoint.Administration.SPFeatureDefinition.get_Scope() at Microsoft.SharePoint.Administration.SPFeatureDefinition.ActivationDependencyComparer.System.Collections.Generic.IComparer<Microsoft.SharePoint.Administration.SPFeatureDefinition>.Compare(SPFeatureDefinition featdef1, SPFeatureDefinition featdef2) at Microsoft.SharePoint.Deployment.WebSerializer.ExportFeatureComparer.System.Collections.Generic.IComparer<Microsoft.SharePoint.Deployment.ExportObject>.Compare(ExportObject exportObject1, ExportObject exportObject2) at System.Collections.Generic.ArraySortHelper1.QuickSort[TValue](T[] keys, TValue[] values, Int32 left, Int32 right, IComparer`1 comparer)

As you can see (the bolded text above), the real culprit was an orphaned feature that was present on the source site but it’s physical components were not present on the 12/TEMPLATE/FEATURES folder. After the feature redeployment and reactivation, the export job was ready to go.

MOSS Shared Services Provider Administration Job Error (Event ID 6482)



The Event Log shows the following error entry for Office Server Shared Services with Event ID 6482, every couple of minutes:

Application Server Administration job failed for service instance Microsoft.Office.Server.Search.Administration.SearchServiceInstance (edc207f7-5d7e-44cc-b65a-2326be88ffca).
Reason: No mapping between account names and security IDs was done. (Exception from HRESULT: 0x80070534)

Additionally, when you click the “View Properties” menu entry of the SSP in Central Administration / Shared Services in this Farm, an error page appers with the following error:

An unhandled exception occurred in the user interface.Exception Information: The specified account name is invalid.
Parameter name: account


The SSP adds the application pool account to the “View Properties” page of the SSP. If this application pool is later changed and the original account is removed from Active Directory, the page crashes because it can’t map the username to the actual user (as there is none to be found). Additionally, there’s a timer job in SSP that refreshes the configuration and it also fails due to the same error.


  • Set the detailed SharePoint logs in Central Administration, by setting Verbose level for the “Office Server General” category
  • In the logs, check the user that SSP is trying to find
  • Recreate that user temporarily in Active Directory (with no special privileges)
  • Go to the SSP Properties page in Central Administration and remove that user from the last list box in the properties page (“Process Accounts”)
  • Remove that user from the Active Directory