Search This Blog

Wednesday, June 16, 2010

STSADM Error: "Object reference not set to an instance of an object"

I wanted to deploy the newly created site definition build into a wsp package on my clients machine. The solution worked fine on my machine. But when I tried to add the solution to my clients server using the command stsadm -o addsolution -filename "<solution name.wsp>" I got an error "Object reference not set to an instance of an object".

I searched the SharePoint log at the location c:\Program Files\Common Files\Microsoft Shared\web server extensions\12\LOGS for any additional information.

Following information was logged into the log file related to the issue:

06/15/2010 08:03:11.67     STSADM.EXE (0x1818)                         0x17E4    Windows SharePoint Services       Database                          880i    High        System.Data.SqlClient.SqlException: Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.     at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)     at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)     at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)     at System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK)     at System.Data.SqlClient.SqlInternalConnectionTds.AttemptOneLogin(ServerInfo serverInfo, String newPassword, Boolean ignoreSniOpenTimeout, Int64 timerExpire, SqlConnection owningObje...   

On reviewing this info I found that I was using the local system admin account to deploy the feature. Only thing I did to resolve the issue was to re-login as domain account having appropriate access and deploy the solution.

No comments: