NullReferenceException While Importing

Mar 4, 2010 at 12:03 AM

I exported a single Web with All security retaining object identity and now I'm trying to import it and I'm getting an error:

FatalError: Object reference not set to an instance of an object.
   at System.Windows.Forms.Control.MarshaledInvoke(Control caller, Delegate method, Object[] args, Boolean synchronous)
   at System.Windows.Forms.Control.Invoke(Delegate method, Object[] args)
   at COB.SharePoint.Utilities.DeploymentWizard.UI.frmContentDeployer.setImportStarted(ProgressBar prgBar, SPDeploymentEventArgs e, Object data)
   at COB.SharePoint.Utilities.DeploymentWizard.Core.WizardDeployment.import_Started(Object sender, SPDeploymentEventArgs e)
   at Microsoft.SharePoint.Deployment.SPDeployment.OnStarted(SPDeploymentEventArgs e)
   at Microsoft.SharePoint.Deployment.SPImport.Run()

Any ideas on how to fix this?

Thanks! I'm hoping this tool with get me through until I re-design the site to use features rather than SPD customizations.

Mar 18, 2010 at 5:02 PM
Edited Mar 18, 2010 at 5:03 PM

I fixed this error for beta 2.7. I downloaded and stepped through the source code to get the inner exception and found that there is some problem with the progress bar on the form. On the frmContentDeployer.cs code file I commented out line #1172 which calls the setImportStarted(ProgressBar prgBar, SPDeploymentEventArgs e, object data) method. The actual line that is failing is line #1187 (within the setImportStarted method):

this.Invoke(delSetValue, new object[] { prgBar, e, data });

I couldn't figure out what is null so I just commented the entire method. I think the progress bar is a bit squirrelly but everything works now!

Mar 21, 2010 at 7:37 PM

I owe you one Jabit - I'm a total hack but was able to use your comment to get the SPCDW to start working again. 

Thank you!

PS: Now whether I live to talk about the deployment project I'm currently in is another story!

Apr 7, 2010 at 10:54 PM


Uploaded a public version with this fix (added a couple of try/catch blocks). Version 2.8 onwards should not have this issue.

Thanks for you patience :)