question

rajivkumar-8367 avatar image
0 Votes"
rajivkumar-8367 asked AmosWu-MSFT commented

WSP Deployment error in Sharepoint 2013

Hi,
When we are trying to deploy a WSP , below is the error message :

System.InvalidOperationException: Operation is not valid due to the current state of the object.
at Microsoft.SharePoint.Administration.SPConfigurationDatabase.Microsoft.SharePoint.Administration.ISPPersistedStoreProvider.GetParent(SPPersistedObject persistedObject)
at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.get_DisplayName()
at Microsoft.SharePoint.Administration.SPSolutionLanguagePack.SetSolutionFile(SPFarmSolutionPackage solnPackage, String path, String solutionName, Boolean isRestore)
at Microsoft.SharePoint.Administration.SPSolution.AddLanguagePack(SPFarmSolutionPackage solnPackage, String path, UInt32 lcid, String name, Boolean isRestore)
at Microsoft.SharePoint.Administration.SPSolutionCollection.Add(String path, String name, UInt32 lcid, Boolean isRestore)
at Microsoft.SharePoint.PowerShell.SPCmdletAddSolution.CreateDataObject()
at Microsoft.SharePoint.PowerShell.SPNewCmdletBase`1.InternalProcessRecord()
at Microsoft.SharePoint.PowerShell.SPCmdlet.ProcessRecord()

Tried the below but could not help:

1) Restarted Timer service
2) Deployed using PowerSHell / Directly with Visual studio
3) Restarted IIS
4) Cleared Timer Job cache
5) Restarted server
6) Executed configuration wizard

Below are the other observations:
1) Event Viewer showing the error “The SharePoint Timer Service service terminated unexpectedly. It has done this 12 time(s). The following corrective action will be taken in 30000 milliseconds: Restart the service.” Every 3 mins.,, Event ID 7031
2) All the SP services are running as expected

office-sharepoint-server-administrationoffice-sharepoint-server-development
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

What solution are you installing?

0 Votes 0 ·

Hi @rajivkumar-8367,
Could you share more information wtih us for further research?

0 Votes 0 ·

1 Answer

sharatha avatar image
0 Votes"
sharatha answered

Make sure the timer service running service account is placed in all server's Local Admin Group and make sure all the timer services are running from your SharePoint Farm.

 $farm  = Get-SPFarm 
 $disabledTimers = $farm.TimerService.Instances | where {$_.Status -ne "Online"} 
 if ($disabledTimers -ne $null) 
 { 
     foreach ($timer in $disabledTimers) 
     { 
         Write-Host "Timer service instance on server " $timer.Server.Name " is not Online. Current status:" $timer.Status 
         Write-Host "Attempting to set the status of the service instance to online" 
         $timer.Status = [Microsoft.SharePoint.Administration.SPObjectStatus]::Online 
         $timer.Update() 
     } 
 } 
 else 
 { 
     Write-Host "All Timer Service Instances in the farm are online! No problems found" 
 } 

Try clearing the config cache using below article script and then try again:

https://github.com/DwayneSelsig/spcachecleaner/blob/master/SPCacheCleaner.ps1

Thanks & Regards,

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.