Welcome to TechNet Blogs Sign in | Join | Help

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

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.

Published Saturday, April 12, 2008 1:43 AM by Stefan_Gossner

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

Friday, April 11, 2008 7:59 PM by Stefan Goßner

# Deep Dive into the SharePoint Content Deployment and Migration API - Part 6

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

Monday, April 21, 2008 2:27 PM by Val Bongiorno

# WSS Anayzer Features

Sorry about the title

how do i install/run your wssanalyzefeatures.exe?

is there any documentation?

Tuesday, April 22, 2008 3:12 AM by Stefan_Gossner

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

Hi Val,

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

Cheers,

Stefan

Friday, May 23, 2008 7:29 AM by skillmaster

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

how do you set your server for this tool?

Friday, May 23, 2008 7:37 AM by Stefan_Gossner

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

Hi Skillmaster,

you have to run the tool on the server itself.

You cannot run it from remote.

Cheers,

Stefan

Friday, May 30, 2008 9:30 AM by Li

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

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 ?

Friday, May 30, 2008 4:03 PM by Stefan_Gossner

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

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

Monday, June 02, 2008 5:08 AM by Li

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

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 ?

Monday, June 02, 2008 7:56 AM by Stefan_Gossner

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

Hi Li,

please open a support case to get this analyzed.

Cheers,

Stefan

Thursday, July 10, 2008 11:40 AM by Jack

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

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

Thursday, July 10, 2008 12:09 PM by Stefan_Gossner

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

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

Leave a Comment

(required) 
required 
(required) 
 
Page view tracker