STSADM AddSolution and DeploySolution Object Reference not set to an Instance of the Object error


When deploying Solution packages to MOSS, the deployment must be made with an account that is a Farm Administrator. Otherwise you will get an error about Object Reference not set to an instance of the object. You can also run a CMD prompt window as the MOSS application pool account and run

Stsadm.exe –o addsolution <solutionLocation>

And

StsAdm.exe –o deploysolution –name <solutionname.wsp> -local –allowgacdeployment –force –url http://localhost

to deploy the solution

Here is a forum post that talks about this issue

http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1257801&SiteID=17

Advertisements

3 Responses to STSADM AddSolution and DeploySolution Object Reference not set to an Instance of the Object error

  1. Daniel says:

    Hi

    This issue is driving me insane devloping a TopNavBar feature in MOSS 2007. Simply wiring up the feature which compiles seems to cause this issue when the VSeWSS 1.3 attempts to activate the feature. I have seen the link you mentioned before but unfortunately the page is missing… any ideas on how I can fix this.

    Daniel
    Nice elegant wordpress template btw 😉

  2. Dan says:

    There’s another case which can cause this error. It occurs when you are developing in VB.NET with Visual Studio (2010 in my case) and don’t have a Root Namespace set in the Project Application settings. When you add a new WebPart it will fail the next time you try to deploy. It may be because when the WebPart gets added, it automatically adds an entry to the Package Manifest instructing it to add an entry to the SafeControls, however it omits any namespace in the entry. At any rate, having a Root Namespace solved my problem (at least while I was adding the webpart)

  3. Praveen says:

    Here is the solution for it:
    http://praveenbattula.blogspot.com/2010/11/stsadm-object-reference-not-set-to.html

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: