I just came across this error when activating a feature with a list template and list instance. Basically I hit the Activate button and was greeted by this less than friendly error message. If you’ve read my previous post on troubleshooting errors in SharePoint, you’ll know that the first thing I did was to crack open the tracelogs.Here’s what I found:
- Feature Activation: Activating Feature ‘Client.SpiManuals.PublicationRepository’ (ID: ‘f00559d4-5bc0-4022-92f8-8513502ec3d3’) at URL http://sevm955603:15000/DepartmentsAndDivisions/TransET.
- The element ‘{98C2E234-ABB6-4CD3-8DE4-19BBCB5C01BF}’ of type ‘ListInstance’ for feature ‘Client.SpiManuals.PublicationRepository’ (id: f00559d4-5bc0-4022-92f8-8513502ec3d3) threw an exception during activation: Exception from HRESULT: 0x81070215
- Feature Activation: Threw an exception, attempting to roll back. Feature ‘Client.SpiManuals.PublicationRepository’ (ID: ‘f00559d4-5bc0-4022-92f8-8513502ec3d3’). Exception: Microsoft.SharePoint.SPException: Exception from HRESULT: 0x81070215 —> System.Runtime.InteropServices.COMException (0x81070215): Exception from HRESULT: 0x81070215 at Microsoft.SharePoint.Library.SPRequestInternalClass.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt) at Microsoft.SharePoint.Library.SPRequest.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType…
- …, ListQuickLaunchOptions qlOpt) — End of inner exception stack trace — at Microsoft.SharePoint.Library.SPRequest.CreateList(String bstrWebUrl, String bstrTitle, String bstrDescription, String bstrListUrl, String bstrFeatureId, Int32 lTemplateID, String bstrDocTemplateType, ListQuickLaunchOptions qlOpt) at Microsoft.SharePoint.SPListCollection.CreateList(String strTitle, String strDescription, String strListUrl, String strFeatureId, Int32 templateID, String strDocTemplateType, QuickLaunchOptions qlOpt) at Microsoft.SharePoint.SPListCollection.Add(String strTitle, String strDescription, String strUrl, String strFeatureId, Int32 templateType, String docTemplateType, QuickLaunchOptions quickLaunchOptions) at Microsoft.SharePoint.SPListInstanceElement.EnsureListExists(SP…
- …Web web) at Microsoft.SharePoint.SPListInstanceElement.ElementActivated(SPFeaturePropertyCollection props, SPSqlCommand sqlcmdAppendOnly, SPWebApplication webApp, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionListInstances(SPFeaturePropertyCollection props, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.Administration.SPElementDefinitionCollection.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.SPFeature.ProvisionElements(SPFeaturePropertyCollection props, SPWebApplication webapp, SPSite site, SPWeb web, Boolean fForce) at Microsoft.SharePoint.SPFeature.Activate(SPSite siteParent, SPWeb web…
- …Parent, SPFeaturePropertyCollection props, Boolean fForce)
- #20015: Cannot open "schema.xml": no such file or folder.
- (#2: Cannot open "schema.xml": no such file or folder.)
- Failed to retrieve the list schema for feature {F00559D4-5BC0-4022-92F8-8513502EC3D3}, list template 10002; expected to find it at: "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\Template\Features\Client.SpiManuals.PublicationRepository\$Resources:List_PublicationLibrary_Name;".
- Failed to find the list schema for FeatureId ‘{F00559D4-5BC0-4022-92F8-8513502EC3D3}’, list template ID 10002. Cannot create list in web "http://sevm955603:15000/DepartmentsAndDivisions/TransET" at URL "PublicationLibrary".
My eyes were drawn immediately to the ninth line. Obviously there’s no directory named $Resources:List_PublicationLibrary_Name; so what’s going on here? Let’s take a look at the list template xml file.
<Elements xmlns="http://schemas.microsoft.com/sharepoint/">
<ListTemplate
Name="$Resources:List_RevisionLibrary_Name;"
Type="10001"
BaseType="1"
OnQuickLaunch="TRUE"
SecurityBits="12"
Sequence="301"
DisplayName="$Resources:List_RevisionLibrary_Title;"
Description="$Resources:List_RevisionLibrary_Description;"
Hidden="True"
EnableModeration="True"
VersioningEnabled="True"
Image="/_layouts/images/itdl.gif" />
</Elements>
I use resource files to name stuff in my XML files, which for the most part works great. Need to change the name of a list? Just crack open the resource file and change it, and it’ll change everywhere you have that referenced (ok, so it’s not as useful for lists as it is for say content types or site columns, but still).
The problem here lies in how SharePoint figures out where your schema.xml file is. It actually looks for a directory where the xml file is stored with the same name as the Name attribute of your ListTemplate tag. It doesn’t like one bit that you’re referring to a resource file.
Moral of the story: Don’t refer to resource files in the Name attribute of your ListTemplate xml tag. It’ll cause you problems.
Leave a Reply