I moved back to my original role as a Support Escalation Engineer so future posts are going to be random. Some post involve troubleshooting both SharePoint 2007/2010. I’ll also still continue to post the How To/Conceptual stuff with SharePoint 2010.

This post involves an interesting issue I recently got where the customer was unable to complete the Export phase of a Content Deployment job due to the following error:

ServerA to the destination server ServerB, We receiving and error message as "6/1/2010 9:00 AM The system cannot find the file specified. (Exception from HRESULT: 0x80070002) at Microsoft.SharePoint.Library.SPRequestInternalClass.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob) at Microsoft.SharePoint.Library.SPRequest.GetFileAsByteArray(String bstrUrl, String bstrWebRelativeUrl, Boolean bHonorLevel, Byte iLevel, OpenBinaryFlags grfob) at Microsoft.SharePoint.Deployment.FileSerializer.SaveFile(SerializationInfo info, ExportObjectManager objectManager, ExportDataFileManager fileManager, SPExportSettings settings, SPWeb parentWeb, Boolean isGhosted, String setupPath, String setupPathUser, Byte setupPathVersion, String webRelativeFileUrl, Int32 size, Byte level) _catalogs/masterpage/mycustommasterpage.master

Note: The end of the call stack is helpful here with these errors.

 

Cause:

In my case, the customer was missing a custom feature which deployed this particular master page.

Validation Techniques:

1. The master page is no longer listed as an item in the associated pages library

2. The feature was missing from the following directory:

C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features

3. Running stsadm –o preupgradecheck provided a list of features that were reported as missing

Note: Must have SP2

Question: So how is Content Deployment discovering that the feature is missing?

Answer: The feature is being referenced in the features table. One way to validate is to run the following SQL query against the associated content database:

select * from features with (NOLOCK) where Properties like ‘%nameofcustomfeature%’

 

Resolution:

The resolution depends on whether or not the SharePoint administrator wants the custom feature.

If the custom feature is wanted:

    1. Copy the feature to the following directory:

    C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features

    2. Stsadm –o installfeature –filename customfeaturename\feature.xml

    3. Stsadm –o activatefeature –name customfeaturename –url “http:\\contoso”

If the custom feature is not wanted:

Run the following: stsadm –o deactivatefeature –filename “customfeaturename\feature.xml” –url http:\\contoso”

Note: If this errors stating that the feature is still present, you need to ensure that the associated object is not present in the objects table within the Configuration database.

Run stsadm –o deleteconfigurationobject –id “FeatureID”

Note: The feature ID is the one identified from either of the following steps:

  1. The output of the preupgrade check
  2. The output of the following: select * from features with (NOLOCK) where Properties like ‘%nameofcustomfeature%’ “Feature ID column”

In my particular instance, the stsadm –o deactivatefeature didn’t purge the references of the feature from the feature table even though it reported as successful. In this case, you must redeploy the feature and then properly deactivate and uninstall.

-Russ Maxwell, MSFT