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

Monday, August 18, 2008 3:41 PM by Richard

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

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

Monday, September 08, 2008 12:16 PM by Stefan_Gossner

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

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

Monday, November 10, 2008 2:42 AM by Ken

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

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

Monday, November 10, 2008 2:54 AM by Stefan_Gossner

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

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

Monday, November 10, 2008 3:06 AM by Ken

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

Hi Stefan,

Thanks for your reply.

The database has not been moved since the farm is created. Moreover, I tried to export different site from web application A and import the site to web application B. The site can be imported successfully.

For your information, the moss farm version is 12.0.0.6324. The site which has import error contain a "search center" sub site.

Could you like to talk more about feature "S2SiteAdmin?

Thanks a lot

Regards,

Ken Tsui

Monday, November 10, 2008 3:12 AM by Stefan_Gossner

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

Hi Ken,

the version number you mentioned is the WSS version number of your system. What is the MOSS version number?

Please check the file version of your Microsoft.SharePoint.Portal.dll and Microsoft.SharePoint.Publishing.dll

Cheers,

Stefan

Monday, November 10, 2008 3:30 AM by Ken

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

Hi Stefan,

I installed the MOSS and then upgrade to SP1. I applied the hotfix ( 946517,953137,941422) and then applied Infrastructure Updates. Finally, I applied hotfix (956248)

Microsoft.SharePoint.Portal.dll  and Microsoft.SharePoint.Publishing.dll version are 12.0.6318.5000

How to check the MOSS version number? I have check the Central Administration site and it also mention that the version is 12.0.0.6324.

I get a verson 3.1.5.0 from the content database table (dbo.version). Is it a version number of MOSS?

Regards,

Ken

Monday, November 10, 2008 3:48 AM by Stefan_Gossner

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

Hi Ken,

the central admin always only lists the WSS version. The MOSS version can only be seen by looking at the DLLs I mentioned.

Here you are pre-Infrastructure update.

I would suggest to install the Infrastructure update or the October CU on the system:

http://blogs.technet.com/stefan_gossner/archive/2008/10/29/the-october-cumulative-update-for-wss-v3-and-moss-2007-has-been-released-yesterday.aspx

Cheers,

Stefan

Monday, November 10, 2008 4:04 AM by Ken

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

Hi Stefan,

Thanks for your reply,

I would like to know whether I can applied Oct CU directly and bypass August CU?

Regards,

Ken

Monday, November 10, 2008 4:43 AM by Stefan_Gossner

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

Hi Ken,

yes that is ok. If the problem still occurs after applying the October CU please open a support case to get this analyzed.

To check if the October CU has been applied correctly please check the version of the following files:

Microsoft.SharePoint.dll

Microsoft.SharePoint.Publishing.dll

They should have build 6332 and 6331.

Cheers,

Stefan

Friday, December 12, 2008 7:45 AM by DraheAnd

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

Hi,

did anyone get the issue with the following message solved?

Value does not fall within the expected range.

 at Microsoft.SharePoint.SPSecurity.ValidateSecurityOnOperation

It is from Li's message above. It is really frustrating because it is not possible to get a solution to this problem. I always get this error when I try to export a publishing site. Exporting the childs itself finishes without errors. But I cannot import these exports because the importer reports dependencies between the subsites that I cannot resolve. If I import site a it states site b is not present and vice versa.

I would be very pleased, if it would be possible to solve this issue.

Regards,

Andreas

Friday, December 12, 2008 9:06 AM by Stefan_Gossner

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

Hi Andreas,

please check with the WssAnalyzeFeatures tool. This should be a different flavor of the same issue.

Cheers,

Stefan

Friday, January 16, 2009 7:44 AM by Stefan Goßner

# Content Deployment - Best Practices

In the past I have released several blogs about the various problems that can occur with Content Deployment.

Wednesday, February 04, 2009 3:16 PM by Appaji

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

hi,

i am getting following error while runing jobs

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()

Wednesday, February 04, 2009 5:05 PM by Stefan_Gossner

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

Hi Appaji,

that means that your two farms are not on the same hotfix level.

Content deployment requires that both farms are on the same hotfix level.

Cheers,

Stefan

Tuesday, March 10, 2009 6:02 AM by Till Skidzun

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

Hi,

we had also the error "Could not find Feature S2SiteAdmin. at Microsoft.SharePoint.Deployment.ImportRequirementsManager ..." during a content deployment. Because we were sure that both farm has the same hotfix level, we tried the command

"stsadm -o installfeature -name S2SiteAdmin" on the target farm. This seems to work...

Kind regards

Till

Thursday, April 30, 2009 10:49 AM by David

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

Thank you sooooo much for writting these tools - they are a complete life saver!!!

Monday, July 20, 2009 11:37 PM by Trevor

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

Thank you for this blog posting and your feature analyzer!  Excellent!

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker