Stsadm Import fails with fatal error: Length cannot be less than zero
Hello,Upon attempting a restore / import using stsadm.exe I am getting the follwing error.Progress: Importing File Workflows/Convert/Convert.aspx.Progress: Importing File Workflows/Convert/Convert.xoml.Progress: Importing File Workflows/Convert/Convert.xoml.wfconfig.xml.Progress: Importing ListItem /_catalogs/masterpage?id=1.Progress: Importing ListItem /Lists/Account Catrgories?id=1.Progress: Importing ListItem /Lists/Account Catrgories?id=10.Progress: Importing ListItem /Lists/Account Catrgories?id=11.Progress: Importing ListItem /Lists/Account Catrgories?id=12.Progress: Importing ListItem /Lists/Account Catrgories?id=2.Progress: Importing ListItem /Lists/Account Catrgories?id=3.Progress: Importing ListItem /Lists/Account Catrgories?id=7.Progress: Importing ListItem /Lists/Account Catrgories?id=8.Progress: Importing ListItem /Lists/Account Catrgories?id=9.Progress: Importing ListItem /Lists/Accounts?id=10.FatalError: Length cannot be less than zero.Parameter name: length at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at Microsoft.SharePoint.Deployment.ListItemSerializer.GetLookupInfoFromFieldData(Object value, Guid& lookupListId, Int32& lookupItemId, Boolean& isUserLookup, String& userLogin, String& mvlVal) at Microsoft.SharePoint.Deployment.ListItemSerializer.UpdateFieldData(SPListItem listItem, ImportObjectManager objectManager, Guid docId, String fieldName, String value, String value2, Guid gFieldId, Boolean& bCreated, Dictionary`2 brokenFields) at Microsoft.SharePoint.Deployment.ListItemSerializer.UpdateFieldData(SPListItem listItem, Guid docId, Boolean& bCreated, SPContentTypeId contentTypeId, ImportObjectManager objectManager, Object data) at Microsoft.SharePoint.Deployment.ListItemSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject) at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject,DeploymentObject envelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader) at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects() at Microsoft.SharePoint.Deployment.SPImport.Run()Progress: Import Completed.Finish Time: 8/4/2008 10:43:49 AM.Completed with 0 warnings.Completed with 1 errors. Log file generated: C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\BIN\pipeline.cmp.import.log Length cannot be less than zero.Parameter name: lengthIf anyone has any ideas on how to fix this or workaround it please hook me up!! I would owe you big-time asit is essential that I get this site back up and running.Thanksto all in advance.Stowe
August 4th, 2008 11:21pm

try stsadm backup and restore the restore has to be on a blank site i.e site with a blank site template !Sharepoint admin
Free Windows Admin Tool Kit Click here and download it now
August 5th, 2008 1:29am

Hi Stowner,You are not stating whether you are using restore or import. But is looks like you may be using import.Shivam is probably right, but do get back to us! By the way, restore keeps all internal GUIDs while import doesn't (it creates new GUIDs).MCP, MCTS | Where I work: http://www.peoplenet.dk | Where I blog: http://sharepointsharpener.wordpress.com
August 5th, 2008 10:52am

HiI am also facing the same problem. Did you get any resolution for this? If yes, please share....RegardsBala.
Free Windows Admin Tool Kit Click here and download it now
September 2nd, 2008 9:50pm

Same issue, any resolution? We can't backup and restore because we are trying to move a subsite to a sitcollection.We are attempting to export/import a subsite into a new Site collection on a new farm. It's an IT application template on both sides.when attempting to import we get this error and nothing else makes it over after that.[3/5/2009 6:12:55 PM]: FatalError: Length cannot be less than zero.Parameter name: length at System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy) at Microsoft.SharePoint.Deployment.ListItemSerializer.GetLookupInfoFromFieldData(Object value, Guid& lookupListId, Int32& lookupItemId, Boolean& isUserLookup, String& userLogin, String& mvlVal) at Microsoft.SharePoint.Deployment.ListItemSerializer.UpdateFieldData(SPListItem listItem, ImportObjectManager objectManager, Guid docId, String fieldName, String value, String value2, Guid gFieldId, Boolean& bCreated, Dictionary`2 brokenFields) at Microsoft.SharePoint.Deployment.ListItemSerializer.UpdateFieldData(SPListItem listItem, Guid docId, Boolean& bCreated, SPContentTypeId contentTypeId, ImportObjectManager objectManager, Object data) at Microsoft.SharePoint.Deployment.ListItemSerializer.SetObjectData(Object obj, SerializationInfo info, StreamingContext context, ISurrogateSelector selector) at Microsoft.SharePoint.Deployment.XmlFormatter.ParseObject(Type objectType, Boolean isChildObject) at Microsoft.SharePoint.Deployment.XmlFormatter.DeserializeObject(Type objectType, Boolean isChildObject, DeploymentObject envelope) at Microsoft.SharePoint.Deployment.XmlFormatter.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ObjectSerializer.Deserialize(Stream serializationStream) at Microsoft.SharePoint.Deployment.ImportObjectManager.ProcessObject(XmlReader xmlReader) at Microsoft.SharePoint.Deployment.SPImport.DeserializeObjects() at Microsoft.SharePoint.Deployment.SPImport.Run()[3/5/2009 6:12:56 PM]: Progress: Import Completed.Thanks for any help or information.
March 9th, 2009 8:07pm

Same issue- using the "Sales Pipeline" template. Anyone resolve this?
Free Windows Admin Tool Kit Click here and download it now
April 30th, 2010 10:19pm

Same issue with Bug Database template. Unable to import after successfully exporting. Same error as JCNet Backup/restore is out of the question because it is a sub-site that needs to be moved to another site collection, as subsite.
November 22nd, 2010 10:26am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics