Microsoft KB Archive/839649

= You receive a &quot;Cannot import a Folder (tree) exported as a Document Library into an area hierarchy&quot; error message when you use the Spin.exe tool with the /area option in SharePoint Portal Server 2003 =

Article ID: 839649

Article Last Modified on 9/18/2006

-

APPLIES TO


 * Microsoft Office SharePoint Portal Server 2003

-





SYMPTOMS
You may not be able to use the Spin. exe tool to import content from a Microsoft SharePoint Portal Server 2001 workspace to a subarea in Microsoft Office SharePoint Portal Server 2003. (The Spin.exe tool is one of the Document Library Import Tools.) When you try to use the Spin.exe tool with the /area command-line option, you receive the following error message:

Cannot import a Folder (tree) exported as a Document Library into an area hierarchy, remove the /area option and try again



CAUSE
This issue may occur if both the following conditions are true, in the order that they are presented in:
 * 1) You use the Spout.exe tool to export the SharePoint Portal Server 2001 workspace as one document library by using the Create one document library option. (Spout.exe is another Document Library Import Tool.)
 * 2) You use the Spin.exe tool to import the content to a SharePoint Portal Server 2003 subarea by using the /area command-line option.



WORKAROUND
To work around this issue, edit the XML manifest file that is created by the Spout.exe tool, and then use the Spin.exe tool to import the SharePoint Portal Server 2001 content to the SharePoint Portal Server 2003 subarea. To do this, follow these steps:   In the XML manifest file that is generated by the Spout.exe tool, add  tags around the existing  tags as follows, where  is the name of the subarea that you want to import the content to, and   is data that is located in the  tags:  NameOfSubArea  <AreaTemplate /> <InheritSecurity>true</InheritSecurity> <Security> <Members /> </Security> Data</DocumentLibrary> </Area> To do this, follow these steps: <ol style="list-style-type: lower-alpha;"> <li>Start Notepad, and then open the XML manifest file that is created by the Spout.exe tool.</li> <li> Locate the </DocumentLibrary> tags, and then add the following XML code around the </DocumentLibrary> tags as follows:  NameOfSubArea</Title> <Description /> <AreaTemplate /> <InheritSecurity>true</InheritSecurity> <Security> <Members /> </Security> data</DocumentLibrary> </Area> </li> <li>On the File menu, click Save, and then quit Notepad.</li></ol> </li> <li>Run the Spin.exe command by using the /targetsecurity command-line option and by using any other command-line options that are appropriate to your situation.

The /targetsecurity command-line option enforces the existing security settings that are configured for the subarea in SharePoint Portal Server 2003. For more information about the command-line options that are available for use with Spin.exe, see the Spinspouthelp.mht file that is located in the folder where you extracted the SharePoint Portal Server 2003 Document Library Migration Tools files.</li></ol>

<div class="moreinformation_section">

MORE INFORMATION
The SharePoint Portal Server 2003 Document Library Migration Tools Spout.exe and Spin.exe are tools that you can use to migrate documents and metadata from SharePoint Portal Server Web Storage System–based document libraries to SharePoint Portal Server 2003 Microsoft SQL Server document libraries. To download and to obtain the SharePoint Portal Server 2003 Document Library Migration Tools, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=feea83b4-7f46-4040-bce2-5341e5c1b107&amp;displaylang=en

For more information about how to migrate documents and metadata from SharePoint Portal Server Web Storage System–based document libraries to SharePoint Portal Server 2003 SQL Server–based document libraries, see the SharePoint Portal Server 2003 Advanced Migration Scenarios white paper. To view this white paper, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?FamilyID=4925b907-0dd8-4be0-af9f-02c8543f47c9&amp;displaylang=en

Subareas
By design, Spin.exe does not let you specify subareas to import documents into SharePoint Portal Server 2003. The /area flag that is available with Spin.exe does not work as expected.

Workaround
Edit the XML file and wrap the DocumentLibrary element with an area element. Every document library to be imported into an area or a subarea needs to be wrapped in an area tag.

To import a document library into a subarea, the entire XML code within the area tag must be nested inside the parent area element, right after the ending DocumentLibrary tag, for example, </DocumentLibrary>.

To prepare the new XML file for import, follow these steps: <ol> <li>Locate all the exported document libraries folders that are to be imported.

Assumptions We have used Spout.exe to export three document libraries to the following folders: <ul> <li>c:\test1 - contains test1_files subfolder and test1.xml</li> <li>c:\test2 - contains test2_files subfolder and test2.xml</li> <li>c:\test3 - contains test3_files subfolder and test3.xml</li></ul> </li> <li>Select one of the Spout.exe output (exported document library as a base), and then make sure that you back up this directory somewhere else.

Assumptions We have copied the contents of the c:\test1 to c:\importmultiple folder and renamed the Test1.xml file to Importmultiple.xml. Additionally, we have copied the Spin.exe file to the c:\importmultiple folder.</li> <li> Copy all the folders that contain document libraries as per the previous assumptions. Copy the following folders to the c:\importmultiple folder: <ul> <li>test2_files from c:\test2</li> <li>test3_files from c:\test3</li></ul>

Resulting File Structure :- [C:\importmultiple] |                               |___ \test1_files |                               |___ \test2_files |                               |___ \test3_files |                               |___ importmultiple.xml, spin.exe </li> <li>The document library area of the XML files in the source folders will be copied to the new XML document.

Note The information between the </DocumentLibrary> tags will be copied to the new, modified XML document inclusive of the </DocumentLibrary> tags.</li> <li> Make a map of the area/subarea layout and note in which area or subarea the document libraries are to be placed. See the following example. [Portal Site] |                      |___ MyTopArea1(area) |        |                         |         |______ MyFirstSubArea(subarea) |        |            |                       |         |            |___ MyDocLibrary1(doclibrary) |        |                       |         |                       |         |______ MySecondSubArea(subarea) |                     |                       |                      |___ MyDocLibrary2(doclibrary) |                      |                       |___ MyTopArea2(area) |                                            |___ MySuperDocLibary(doclibrary) </li> <li>Using the previous example, the following XML structure will map to the areas/subareas above.</li> <li>Assumptions We have used Spout.exe to export three document libraries: <ul> <li>The first document library will be called MyDocLibrary1 and located in the MyFirstSubArea under the MyTopArea1 area.</li> <li>The second document library will be called MyDocLibrary2 and located in the MySecondSubArea under the MyTopArea1 area.</li> <li>The third document library will be called MySuperDocLibrary and located in the MyTopArea2 area.</li></ul> </li> <li>Modify the XML document to update the Document Library part of the XML file with the intended structure by wrapping the document libraries in area tags, for example, </Area>.

Assumptions <ul> <li>The test1 document library will be called MySuperDocLibrary.</li> <li>The test2 document library will be called MyDocLibrary1.</li> <li>The test3 document library will be called MyDocLibrary2.</li></ul>

The document library portion of the XML file should be copied and pasted into the new XML file at the destination area. See the following XML snippet.</li> <li> Invoke Spin with the /targetsecurity flag.

Note This assumes that our XML file is called importmultiple.xml. spin.exe importmultiple.xml /targetsecurity --- xml snippet

 MyTopArea1</Title> <Description /> <AreaTemplate /> <InheritSecurity>true</InheritSecurity> <Security> <Members /> </Security>  MyFirstSubArea</Title> <Description /> <AreaTemplate /> <InheritSecurity>true</InheritSecurity> <Security> <Members /> </Security>   _______ .               |              .                |   MyDocLibrary1 document library .               |      (source: test2.xml) </DocumentLibrary> _______| </Area>  MySecondSubArea</Title> <Description /> <AreaTemplate /> <InheritSecurity>true</InheritSecurity> <Security> <Members /> </Security> <DocumentLibrary>  _______ .               |              .                |   MyDocLibrary2 document library .               |       (source: test3.xml) <DocumentLibrary>  _______| </Area> </Area> <Area> <Title>MyTopArea2</Title> <Description /> <AreaTemplate /> <InheritSecurity>true</InheritSecurity> <Security> <Members /> </Security> <DocumentLibrary>  _______ .                 |            .                  |  MySuperDocLibrary document library .                 |      (source: test1.xml) <DocumentLibrary>  _______| </Area>

--- end of sample xml -- </li></ol>

To specify templates for areas, use the following table to select the template to be placed between the AreaTemplate tags <AreaTemplate> </AreaTemplate>.

Note Each AreaTemplate can have one or more configurations, identified by a configuration ID. For each default template there is only one configuration with an ID of 0 (zero), except for the STS Area Template. This template has two configurations.

To specify the AreaTemplate, select the template and the configuration and place between the <AreaTemplate></AreaTemplate> tags. See the following example of the SPSCOMMU template.

Example <AreaTemplate>SPSCOMMU#0</AreaTemplate> Template                         Maps to         - STS (configuration 0)   Windows SharePoint Services STS (configuration 1)     Blank Web SPS                     Home SPSBWEB                   To create bucket Web sites SPSCOMMU                   Communities SPSMSITE                     Site Registry SPSNEWS                    Subareas under News SPSNHOME                      News Home SPSPERS                    MySite SPSTOC                   Topics Home SPSTOPIC                 Topic

Keywords: kberrmsg kbprb KB839649

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.