We are in the process of upgrading our application from CRM 4.0 to CRM 2015 and currently in CRM 2013. While trying to publish the JavaScript changes for one of the main entity, we are receiving this error and the publish fails. We checked most of the posts regarding similar issue and tried out all the options. But nothing resolves the issue.
Since this is one of the main entity of the application, it has around 600 attributes and 100+ relationships. Recreating the entity would be difficult.
Service Pack 1 installation succeeded but the database updates failed. While trying to update the organization through Deployment Manager, the wizard throws the same error. Below is the stack trace from deployment manager.
09:20:45| Error| Installer Complete: OrganizationDatabaseHotFixer - Error encountered
09:20:45| Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationDatabaseHotFixer: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction
InnerException:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Crm.ObjectModel.StringMapPublisher.RetrieveExistingStringMaps(Int32 objectTypeCode, ICollection attributes, Int32 langId)
at Microsoft.Crm.ObjectModel.StringMapPublisher.UpdateStringMaps(EntityMetadata entity, Int32 langId)
at Microsoft.Crm.ObjectModel.StringMapPublisher.PublishStringMaps()
at Microsoft.Crm.ObjectModel.PublishXml.PublishDuringSetup(ExecutionContext context)
at Microsoft.Crm.SE.DllMethodActions.ImportSystemSolution.PublishStringStatusMapsRibbonData()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId)
at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, Boolean ignoreErrors)
at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType)
at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
InnerException:
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Crm.ObjectModel.StringMapPublisher.RetrieveExistingStringMaps(Int32 objectTypeCode, ICollection attributes, Int32 langId)
at Microsoft.Crm.ObjectModel.StringMapPublisher.UpdateStringMaps(EntityMetadata entity, Int32 langId)
at Microsoft.Crm.ObjectModel.StringMapPublisher.PublishStringMaps()
at Microsoft.Crm.ObjectModel.PublishXml.PublishDuringSetup(ExecutionContext context)
at Microsoft.Crm.SE.DllMethodActions.ImportSystemSolution.PublishStringStatusMapsRibbonData()
09:20:45| Info| Setting organization state. New state = Failed
09:20:46| Error| Update Organization with Id=ed29ebf2-193a-e711-bcb4-005056b4365f failed with Exception:
System.Exception: Error.ActionFailed Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Microsoft.Crm.ObjectModel.StringMapPublisher.RetrieveExistingStringMaps(Int32 objectTypeCode, ICollection attributes, Int32 langId)
at Microsoft.Crm.ObjectModel.StringMapPublisher.UpdateStringMaps(EntityMetadata entity, Int32 langId)
at Microsoft.Crm.ObjectModel.StringMapPublisher.PublishStringMaps()
at Microsoft.Crm.ObjectModel.PublishXml.PublishDuringSetup(ExecutionContext context)
at Microsoft.Crm.SE.DllMethodActions.ImportSystemSolution.PublishStringStatusMapsRibbonData()
--- End of inner exception stack trace ---
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
at Microsoft.Crm.Setup.Database.DllMethodAction.Execute(Guid organizationId)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.ExecuteReleases(ReleaseInfo releaseInfo, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.Install(Int32 languageCode, String configurationFilePath, Boolean upgradeDatabase, Boolean isInstall)
at Microsoft.Crm.Setup.Database.DatabaseInstaller.InstallUpdate(String configurationFilePath, Boolean upgradeDatabase)
at Microsoft.Crm.Setup.Common.Update.DBUpdateDatabaseInstaller.ApplyDBUpdates(Guid orgId)
at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdatesInternal(Guid orgId, String orgUniqueName, String releaseFilePath, Boolean ignoreErrors)
at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.ApplyDBUpdates(Guid orgId, String orgUniqueName, OrganizationOperationType operationType)
at Microsoft.Crm.Tools.Admin.InstallDatabaseUpdatesAction.Do(IDictionary parameters)
at Microsoft.Crm.Setup.Shared.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
--- End of inner exception stack trace ---
Any help would be greatly appreciated. Thanks.
*This post is locked for comments