STSADM AddSolution and DeploySolution Object Reference not set to an Instance of the Object error
May 18, 2008 3 Comments
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
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 😉
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)
Here is the solution for it:
http://praveenbattula.blogspot.com/2010/11/stsadm-object-reference-not-set-to.html