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



The information in this article 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:
  1. In the XML manifest file that is generated by the Spout.exe tool, add <Area></Area> tags around the existing <DocumentLibrary></DocumentLibrary> tags as follows, where NameOfSubArea is the name of the subarea that you want to import the content to, and Data is data that is located in the <DocumentLibrary></DocumentLibrary> tags:
    <Area>
      <Title>NameOfSubArea</Title>
      <Description />
      <AreaTemplate />
      <InheritSecurity>true</InheritSecurity>
      <Security>
        <Members />
      </Security>
    <DocumentLibrary>Data</DocumentLibrary>
    </Area>
    
    To do this, follow these steps:
    1. Start Notepad, and then open the XML manifest file that is created by the Spout.exe tool.
    2. Locate the <DocumentLibrary></DocumentLibrary> tags, and then add the following XML code around the <DocumentLibrary></DocumentLibrary> tags as follows:
      <Area>
        <Title>NameOfSubArea</Title>
        <Description />
        <AreaTemplate />
        <InheritSecurity>true</InheritSecurity>
        <Security>
          <Members />
        </Security>
      <DocumentLibrary>data</DocumentLibrary>
      </Area>
      
    3. On the File menu, click Save, and then quit Notepad.
  2. 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.

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: 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:

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:
  1. 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:
    • c:\test1 - contains test1_files subfolder and test1.xml
    • c:\test2 - contains test2_files subfolder and test2.xml
    • c:\test3 - contains test3_files subfolder and test3.xml
  2. 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.
  3. Copy all the folders that contain document libraries as per the previous assumptions. Copy the following folders to the c:\importmultiple folder:
    • test2_files from c:\test2
    • test3_files from c:\test3
       Resulting File Structure :-
                            [C:\importmultiple]
                                    |
                                    |___ \test1_files
                                    |
                                    |___ \test2_files
                                    |
                                    |___ \test3_files
                                    |
                                    |___ importmultiple.xml, spin.exe
  4. 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></DocumentLibrary> tags will be copied to the new, modified XML document inclusive of the <DocumentLibrary></DocumentLibrary> tags.
  5. 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)
  6. Using the previous example, the following XML structure will map to the areas/subareas above.
  7. Assumptions We have used Spout.exe to export three document libraries:
    • The first document library will be called MyDocLibrary1 and located in the MyFirstSubArea under the MyTopArea1 area.
    • The second document library will be called MyDocLibrary2 and located in the MySecondSubArea under the MyTopArea1 area.
    • The third document library will be called MySuperDocLibrary and located in the MyTopArea2 area.
  8. 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></Area>.

    Assumptions
    • The test1 document library will be called MySuperDocLibrary.
    • The test2 document library will be called MyDocLibrary1.
    • The test3 document library will be called MyDocLibrary2.
    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.
  9. Invoke Spin with the /targetsecurity flag.

    Note This assumes that our XML file is called importmultiple.xml.
    spin.exe <siteurl> importmultiple.xml /targetsecurity
    --------------------------- xml snippet ----------------------------
    
    <Area>
    <Title>MyTopArea1</Title>
    <Description />
    <AreaTemplate />
    <InheritSecurity>true</InheritSecurity>
    <Security>
    <Members />
    </Security>
      <Area>
      <Title>MyFirstSubArea</Title>
      <Description />
      <AreaTemplate />
      <InheritSecurity>true</InheritSecurity>
      <Security>
      <Members />
      </Security>
        <DocumentLibrary>   _______
                  .                |
                  .                | ----  MyDocLibrary1 document library
                  .                |      (source: test2.xml)
        </DocumentLibrary>  _______|  
      </Area>
      <Area>
      <Title>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 --------------------------
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 

Modification Type:MajorLast Reviewed:9/18/2006
Keywords:kberrmsg kbprb KB839649 kbAudITPRO