import error
I created a brand new web application for some testing purpose.I export a subsite from our production server and tried to import to this new web application.But I got an error in the import log.[11/18/2009 9:37:17 AM]: FatalError: Object reference not set to an instance of an object.what does this mean, how can I fix it?Thanks
November 18th, 2009 6:58pm

Anna,Usually this occurs when you have content type document libraries. Are you upto date on Cumulative updates and patches ? It affects when you are trying to do a content deployment. Also is this MOSS or WSS ?
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2009 7:27pm

Here are the correct import and export code's, more info and can you report back if this works or not.Notes:1. If you include security make sure the target side is in the same domain or has the same users. 2. If you have a feature on the srouce site it should be on the trarget as well... Installed and activated. 3. try not to cut and paste the commands but type them out. 4. In you export and import make sure to use what's marked as the default site in your Alternate Access Mapping.stsadm -o export -url http://prefix.domain.com/sites/sitename -includeusersecurity -filename c:\sitename.bak -includeusersecurity versions 4stsadm -o import -url http://www.sharepointkris/sites/newsitenamesitename -includeusersecurity -nofilecompression -filenamec:\sitename.bak Kris Wagner, MCITP, MCTS Twitter @sharepointkris Blog: http://sharepointkris.com
November 18th, 2009 7:36pm

Thanks. The original site top site collection is a MOSS 2007 publishing portal. I made the same as in the testing web application.I used command like this:export:C:\>stsadm -o export -url http://sharepoint/contacts -filename p:\contact.bakimport command:C:\>stsadm -o import -url http://sharepointtest:2009/contacts -filename p:\contact.bakThe features are the same, only the version is a little bit different importserver MOSS service pack 2- 12.0.0.6219, the export server version is 12.0.0.6318, does it matter?Also in my new testing web application, I didn't upload the customized mater page in the top site collection which this imported subsite will inherit on, could that be the problem, - does the Object reference not set to an instance of an object mean master page is not there?Thanks
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2009 7:59pm

I have moved basic sites within the same software version (IE SharePoint SP1 with a hot fix) I think the problem is the customization... Can you either detach that then export or attached and import? Either way if you can break the inheritance that will help... I'm heading out for the rest of the day... Let us know what happens.. Kris Wagner, MCITP, MCTS Twitter @sharepointkris Blog: http://sharepointkris.com
November 18th, 2009 8:52pm

This is NOT the correct way to move from DEV to PROD or back again. There are mutiple issues that have to do with object ids andinheritance. Try using eth Sharepoint Content Deployment wizard that use the content deployment api and do not retain object ids on import... This is approved method of moving content...The SharePoint Content Deployment Wizard can be found herehttp://spdeploymentwizard.codeplex.com/-IvanIvan Sanders http://www.linkedin.com/in/iasanders http://dimension-si.com/blog
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2009 9:09pm

Yes, it matters what version you are running the versions need to be the same in both farms.... Also, all solutions / features should be the samedeployed in both farms...The following is from http://blogs.technet.com/stefan_gossner/archive/2007/10/12/deep-dive-into-the-sharepoint-content-deployment-and-migration-api-part-5.aspxCheck out Stephen Deep DiveProblem 1: Mixing deployments with and without retaining object identity First of all: if possible you should avoid this! Importing with different settings for this property into the same database can lead to serious problems during future deployment and such databases will become hard to maintain. Be aware that this also means that you should not use STSADM -oimport against a database that should be used as the destination of a content deployment job! STSADM -o import will not retain the object identity while content deployment does. So why is there a problem when mixing imports with different RetainObjectIdentity settings? The reason is that with RetainObjectIdentity enabled the imported object will have to be created with the same name and the same guid at the same location in the destination database as it was in the source database. If the item already exists it will be updated. If not it will be created. Problems occur if there is an item with the same name but a different Guid in the destination database. This can happen if someone has authored on the destination server and created items with the same name but or if he imported content from the source server WITHOUT RetainObjectIdentity setting set to true. In case that items with the same name but different GUID are allowed for the affected item you will end up with two items with the same name on the destination server. This will be the case (e.g.) for usual ListItems. In case that items with the same name but different GUID are not allowed for the affected item the import will run into an exception similar to the one below and stop: Failed to create the 'Pages' library. OriginalException: There can only be one instance of this list type in a web. => In order to avoid this problem you have to guarantee that content added to the destination databasewill nothave any name/guid conflicts with the source database - even if new content is added to the source databasein the future! Problem 2: Running multiple imports without retaining object identity for updates of the same content When doing an export and import without retaining the object identity on the destination server you can end up with duplicate items in lists as each import tries to create the same list item again with a different GUID. The import is not able to decide whether you would like to overwrite an existing item with the same name or if you would like to have multiple list items with the same name. Without retaining the object identity you will end up with multiple list items with potentially the same content. To force overwrite of list items you have to retain the object identity. That means you cannot use STSADM -o export/import as a replacement for content deployment! If you need to do deploy content to a remote destination server without connectivity you need to write a custom tool that has retain objectidentity enabled rather than using STSADM -o import based on the code samples provided in Part 3 of this article series. => STSADM -o export and import should only be used if the content being imported does not already exist in the destination database and if the database will not be used as the destination database for content deployment (see Problem1 above). Problem 3: delete an item from the source site that belonged to the site definition and recreate it This is a different flavor of the problem discussed as Problem 1. During provisioning of a site items defined in the site definition templateare added to the site. Problems can occur when changes are made to the provisioned items. Especially if the provisioned items aredeleted and replaced with items with the same name. That approach will work well on a single server installation. But it will cause problems when using content deployment. The reason is that during content deployment the site will be provisioned on the destination server using the site definition template. And this will also cause all items defined in this template to be created. When content deployment now tries to import the updated or replaced items there will be a conflict. You will end up with an exception similar to the one in Problem 1. => You should never modify or delete one of the items created through the site definition in your site. If the site definition does not suite your needs you should create a custom site definition that fits to your needs and use this instead to avoid the need to customize some of the provisioned items. Problem 4: deploy from destination back to source This is something that theoretically can be done but only if the source hasn't changed since it was last deployed to the destination. Otherwise the same issues as in Problem 1 can occur. Also be aware that it will not be an incremental deployment - means you cannot just deploy the changes since you deployed from source to destination. The reason is that the timestamp information about what to deploy is stored with the deployment job.As this information only exists on the source system the first deployment from destination back to source will deploy everything! So the result wouldbe the same as deploying into an empty site collection on the soruce system. And actually deploying into an empty site collection would be better to avoid problems in case that changes have been done on the source system. Problem 5: deploy partial content without exporting the parent items When deploying with retaining the object identity (as you can do with content deployment in the central admin) it is not possible to reparent items. Deployment with retaining the object identity requires that the identity of the object is the same on the destination server and the identity is defined by Id, Nameand by the Url. So the parent of each deployed object has to exist on the destination server in order to successfully import the package on the destination server. We have seen that customers are trying to export a specific subtree of the site without exporting the parents. E.g. only a specific variation label without the variation root. If the parent of the exported objects does not exist on the importing site then the item cannot be imported and the deployment will fail. => Ensure that all parents of all content being exported exists on the destination server. => Or create a custom export tool that does not retain object identity and changes the parent during import Problem 6: deploy partial content with references outside the selected scope This is similar to Problem5 exceptthat we assume that the parent objects of the selected object exists in thedestination database. In this situation you might assume thatno problems should occur. That is not correct. When exporting items in a subtree per default all referenced objects (like images ordocuments) willbe exported as well. Even if these objects are outside theselected scope.In thissituation the export packagewill contain objects which might not have a parent in the destination database.-Ivan Ivan Sanders http://www.linkedin.com/in/iasanders http://dimension-si.com/blog
November 18th, 2009 11:02pm

Chris, When you say detach and export, what does detach mean, detach the database or site? how to detach or attach a subsite?Thanks
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2009 6:25am

For this content deployment tool, if I want to import from testing server to production server or the other way. do I have to install it on both servers or just one server?Or is it something like version and feature/solution, if you installed on one server, in order later for backup/restore, import/export to work, they must be an installation on both machines?Any disadvantage of this tool, I mean does it affect any other admininstration/design job on the servers in a bad way?( I had some experience of some other features installed before but not worked as I expected, also affected regular backup/restore, so I had to uninstall it )If not working well, is it easy to uninstall cleanly?___________Also I willupdate the two server to exactly the same patches, and try again.I will come back to update this post.THanks
November 19th, 2009 6:41am

Anna, I'm sorry at some point I missed the dev promo to production part, I thought we were talking about moving a small site... I am honestly having brain surgery in 4 weeks :/ I don't think I was reading correctly or I missed something, I'm posting something on my blog about it soon... 1st ... Advantages of the tool it helps speed the process up, it's been out there for a while and consultants /admin's use it. We know that it works "most of the time". 2nd... There are always disadvantages, however helpful it is an unsupported tool meaning you can't pick up the phone and call someonefor help. 3rd... Free tools for the most part do not take into consideration your environment IE (F5 NLBs/kerberose/ Server 2003 SP1, Forms Based Auth, ISA, TMG 2010) ... As far as Ivan pointing "this is NOT"... If you're moving an entire site or really doing a demo promo in a full blown site then yes you need the same versions of SharePoint and allthe bells and whistles (Features / Solutions) in place and installed.If you have a budget I'd look in paid products likeMicrosoft DPM, Avepoint, or Quest tools. If you have a large site you'll see the value in these tools whenyou have your 1st loss. Thesego down to the document level. If you're a call show look for SharePoint Sushi on CodePlex.com, it's saved me may a times. What resources do you have who can locally assist you in this? I'm just wondering what you might have tried out of all the suggestions as well or are you still just looking for options... Kris Wagner, MCITP, MCTS Twitter @sharepointkris Blog: http://sharepointkris.com
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2009 8:24am

Hi Anna,Good morning....TheSharePoint Content deployment Wizard is a pretty small installation, its not deployed as a feature and will not interfere with your deployment... I have been using the toolas necessary as a quick way to gather client changes to sites, lists, etc, and bring them into my develpment environment since I never have the opportunity to develop in the clientsenvironment....There are a lot of excellent tools in the markettoday that we didnt have a few years ago and not just for backing up sites. However, SharePoint has always been about a development community as well and Codeplex has enabled a lot of really cool tools, features, solutionsto be shared and commented on... I have been fortunate enough to work with Corsworks, Avepoint, Quest, ScriptLogic, Metalogix, K2, Bamboo, Telerik, and Citrix to name a few and would be the first one to tell you which products rock and which suck... However, when in doubt its always good to have friends so I have included a references below:Andrew Connellhttp://sharepoint.microsoft.com/blogs/fromthefield/Lists/Posts/Post.aspx?List=0ce77946%2D1e45%2D4b43%2D8c74%2D21963e64d4e1&ID=113Chris O'Brienhttp://www.sharepointnutsandbolts.com/2007/12/using-sharepoint-content-deployment.htmlhttp://www.sharepointnutsandbolts.com/2007/10/stsadm-export-content-deployment.htmlMaurice Prather- Beware of Import / Exporthttp://www.bluedoglimited.com/SharePointThoughts/ViewPost.aspx?ID=278I use Sharepoint Content Deployment wizard much as Andrew does in the blog.... After I get the lists, into my dev environment i then create the necessary features and deploy as part of a solution...Usage notes The tool must be installed locally on the server which hosts the site Site URL - enter using format http://source.test.dev Import web URL - enter using format http://target.com/targetweb Note: This is the parent of the child you are importing... See 'permissions' note lower down Import/Export characteristicsSince the Content Migration API is used, imports/exports have the following characteristics: dependencies of selected content (e.g. referenced CSS files, master pages) are automatically included in the export - check 'Exclude dependencies of selected objects' to disable this all required content types, columns etc. are automatically included in the export in contrast to STSADM export, it is possible to retain GUIDs during deployment (where objects are not being reparented) - check 'Retain object IDs and locations' to enable this no filesystem files (assemblies, SharePoint Solutions/Features etc.) are deployed - these must already be present on the target for the import to succeed) the following content does not get captured by the Content Migration API - alerts, audit trail, change log history, recycle-bin items, workflow tasks/state ReparentingReparenting of objects such as webs and lists is possible with the following usage on the import:- enter the URL for the target web in the 'Import web URL' textbox- ensure 'Retain object IDs and locations' is not checkedPermissionsThe Content Migration API is used to package the content as a .cmp file, which can be copied to another server for import. The application MUST be run from the SharePoint server(s), and MUST be run under the context of an account which has appropriate SharePoint permissions - currently the way to specify an alternative user to the currently-logged on user is by using the 'Run as..' feature in Windows 2003 (right-click on the .exe and select 'Run as..').As always if you have any questions dont hesitate...Kris, good luck with everything brain surgery doesnt sound like much fun....Cheers,-Ivan Ivan Sanders http://www.linkedin.com/in/iasanders http://dimension-si.com/blog
November 19th, 2009 6:01pm

Thank you very much Kris and Ivan for all the information. They are very helpful.It sounds like this is a great tool. I plan to install it very soon.My situation is someone created a sharepoint intranet site collectionunder our sharepointpublishing internet portal web application on production server.And I don't think it's good idea to create an intranet under an internet application. At least I think they need to be in separate web application.For testing purpose, on testing server, I created a testing web application with blank site and tried to see if I can export the intranet site collection to the new web application. Then I got the error from the first postings. I will upgrade the server to exactly the same patch, and try above suggestions.Thank you again, and good luck with Kris for the suggery, andwish you well soon.
Free Windows Admin Tool Kit Click here and download it now
November 19th, 2009 10:59pm

Hi, Using SPContentDeploymentWizard, is there a way to export-import a modification made to a sharepoint security group without exporting-importing all security (because when selecting import-security=all it is very long to reply...) ? Moreover, is there a way to export-import a SPD workflow with SPContentDeploymentWizard ? Is there a way to export only site navigation using SPContentDeploymentWizard ? Is there a way to remove a list column using SPContentDeploymentWizard (I succeeded to add a new list column but not to remove a list column). Thanks for your help, Best Regards, JCAJean-Christophe
March 14th, 2011 9:08am

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

Other recent topics Other recent topics