<< Back To All Blogs
SharePoint STSADM AddSolution Object Reference not set to an Instance of the Object error
Monday, March 30th, 2009
I recently received the "Object reference not set to the instance of an Object" error while using the following command in stsadm:
stsadm -o addsolution -filename C:MySolution.wsp
This could quite possibly apply to other commands as well, but this was the one I ran into.
There are a number of possible causes to the issue:
1. MySolution.wsp does not have sufficient file rights.
Make sure that the file is on your C drive. This eliminates issues of trusted file security. Also right-click on the file, go to properties, and ensure that the Users account has Full Control.
2. Ensure you are part of the SharePoint Farm Administration group.
Go to Control Panel -> Administrative Tools -> Computer Management. Click on Local Users and Group and ensure whichever user you are currently logged in as is listed as a member under the group WSS_RESTRICTED_WPG. If not add the user.
3. Ensure your user account has proper permissions in the SharePoint Database.
Your user account will need to be set as db_owner of the SharePoint Content Database.
Correction: With the help of our trusty network admin we were able to specifically determine which permissions and databases are required. You will need to be the database owner with dbo schema on the Sharepoint content administration database (something like sharepoint_admincontent) and the Config database (something like sharepoint_config). These are for farm and server configurations respectively. While debugging SQL issues, be sure to check the Event log on the SharePoint server you are altering as it gives very good error messages (for once).
The combination of those 3 factors helped me fix the issue we were having while attempting to roll out a solution to our SharePoint Farm.
SharePointin' Tom Out.
Using MOSS and WSS SharePoint Workflow to Resize Images in an Image Library
Understanding SharePoint Template Ids
Restoring Specific Documents from a MOSS 2007 Content Database Backup
Starting SharePoint workflow for each item in a list
Fixing "Error in loading DLL" in SharePoint
Currently no comments.
Add A Comment
Email Address: (not public, used to send notifications on further comments)
Enter the text above, except for the 1st and last character: