locked
Importing CRM Organizatios using CRM Deployment Management While Migrating CRM 4.0 into CRM 2011. RRS feed

  • Question

  • Pls help if anybody has resolve this issue....

    I am migrating the CRM 4.0 orgainization to CRM 2011 by using deployment manager. but at one stage it is give the error as below.

    Both databases servers are MS SQL 2008 R2.

    i have deleted the custom SP and views from the database.

    18:25:53|Verbose| Removing view attribute '9f1f90e9-ae9f-457d-9314-17b3ab3cce24'.
    18:25:53|   Info| CrmAction execution time; UpgradeDatabaseAction; 00:20:45.8281250
    18:25:53|  Error| Installer Complete: OrganizationUpgrader - Error encountered
    18:25:53|  Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed.
    InnerException:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransitionFactory.CreateStateTransition(FactoryInput input, ComponentStateTransitionActionFactory actionFactory)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.DoDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.UpgradeCustomViewAttributes()
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.RemoveDscReferences()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
    InnerException:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransitionFactory.CreateStateTransition(FactoryInput input, ComponentStateTransitionActionFactory actionFactory)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.DoDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.UpgradeCustomViewAttributes()
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.RemoveDscReferences()

    18:25:53|   Info| Setting organization state.  New state = Failed
    18:25:53|  Error| Upgrade Organization with Id=d2b542a3-adc4-4555-b17b-d3e526e17897 failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransitionFactory.CreateStateTransition(FactoryInput input, ComponentStateTransitionActionFactory actionFactory)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.DoDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.UpgradeCustomViewAttributes()
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.RemoveDscReferences()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
    18:25:53|  Error| An error occurred when trying import and upgrade organization database KACI-DWVSQL-05\CRMDEV2011.BVDev_MSCRM:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=d2b542a3-adc4-4555-b17b-d3e526e17897 failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransitionFactory.CreateStateTransition(FactoryInput input, ComponentStateTransitionActionFactory actionFactory)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.DoDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.UpgradeCustomViewAttributes()
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.RemoveDscReferences()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransitionFactory.CreateStateTransition(FactoryInput input, ComponentStateTransitionActionFactory actionFactory)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.DoDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.UpgradeCustomViewAttributes()
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.RemoveDscReferences()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
        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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
    18:25:53|  Error| Import Organization (Name=BVDev, Id=d2b542a3-adc4-4555-b17b-d3e526e17897) failed with Exception:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=d2b542a3-adc4-4555-b17b-d3e526e17897 failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransitionFactory.CreateStateTransition(FactoryInput input, ComponentStateTransitionActionFactory actionFactory)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.DoDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.UpgradeCustomViewAttributes()
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.RemoveDscReferences()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Platform.SolutionAwareComponents.ComponentStateTransitionFactory.CreateStateTransition(FactoryInput input, ComponentStateTransitionActionFactory actionFactory)
       at Microsoft.Crm.Platform.MetadataBusinessEntities.MetadataProcessObject.DoDelete(MetadataBusinessEntityMoniker moniker, ISqlExecutionContext context)
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.UpgradeCustomViewAttributes()
       at Microsoft.Crm.DataUpgrade.RemoveDscReferencesDriver.RemoveDscReferences()
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Execute(Object obj)
    18:25:54|   Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 2730.

    Wednesday, September 12, 2012 6:57 AM

All replies

  • I can be able to fix error related to "Removing view attribute '9f1f90e9-ae9f-457d-9314-17b3ab3cce24'."

    This is related to deletionstatecode attributes for Custom entities.

    I ran the query

    SELECT  COUNT(*), ViewAttributeId
      FROM [MetadataSchema].[ViewAttribute]
      inner join MetadataSchema.Attribute on ViewAttribute.RemoteAttributeId=Attribute.AttributeId
      where Attribute.Name ='deletionstatecode'
      --and ViewAttributeId= '9f1f90e9-ae9f-457d-9314-17b3ab3cce24'
      group by ViewAttributeId having COUNT(*) > 1

    I have take the list of attributeid by removing grouping in above statement and used list in below query

    select * from MetadataSchema.Attribute where AttributeId in (

    SELECT   Attribute.AttributeId  FROM [MetadataSchema].[ViewAttribute]
      inner join MetadataSchema.Attribute on ViewAttribute.RemoteAttributeId=Attribute.AttributeId
      where Attribute.Name ='deletionstatecode'
      and ViewAttributeId in ( <attibuteid list.>  ) 

    Found that there are multiple records with different ' CustomizationLevel'. it does not allow to modify the customizationlevel =1 to 0. I have deleted the records for attribute is 'deletionstatecode' and customiatonlevel =1. this cleared the error. But now i am getting diffent error xml Pass 2 stage

    Please help me how to remove this error now.  All the plug-ins in 4.0 are registered on Disc and by using CRM service user.

    22:23:00|Verbose| DatabaseAction execution time; MSCRM\UpgradeR4HomepageLayout.sql; 00:00:00.0312498
    22:23:00|   Info| Upgrading Visualizations
    22:23:00|   Info| Did not detect single user -- not clearing pool
    22:23:00|Verbose| DatabaseAction execution time; MSCRM\UpgradeVisualizations.sql; 00:00:00.0468747
    22:23:00|   Info| Upgrading role privileges
    22:23:01|   Info| Did not detect single user -- not clearing pool
    22:23:01|Verbose| DatabaseAction execution time; MSCRM\UpgradeSystemFormPrivileges.sql; 00:00:00.1093743
    22:23:01|   Info| Upgrading OwningBusinessUnit Relationships CascadeDelete to NoCascade from RemoveLink
    22:23:01|   Info| Did not detect single user -- not clearing pool
    22:23:01|Verbose| DatabaseAction execution time; MSCRM\UpdateOwningBusinessUnitRelationships.sql; 00:00:00.4062474
    22:23:01|   Info| Metadata xml upgrade: pass 2
    22:23:10|   Info| CrmAction execution time; UpgradeDatabaseAction; 00:16:34.8686328
    22:23:10|  Error| Installer Complete: OrganizationUpgrader - Error encountered
    22:23:10|  Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed.
    InnerException:
    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
    InnerException:
    System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)

    22:23:10|   Info| Setting organization state.  New state = Failed
    22:23:10|  Error| Upgrade Organization with Id=8f1750f6-8f1f-e111-9a9e-005056aa2ff5 failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
    22:23:10|  Error| An error occurred when trying import and upgrade organization database KACI-DWVSQL-05\CRMDEV2011.BVDEV2011_MSCRM:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=8f1750f6-8f1f-e111-9a9e-005056aa2ff5 failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
    22:23:10|  Error| Import Organization (Name=BVDev, Id=8f1750f6-8f1f-e111-9a9e-005056aa2ff5) failed with Exception:
    Microsoft.Crm.CrmException: Upgrade Organization with Id=8f1750f6-8f1f-e111-9a9e-005056aa2ff5 failed with Exception:
    System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo) ---> System.Exception: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)
       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)
       --- End of inner exception stack trace ---
       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
       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()
       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)
       at Microsoft.Crm.Setup.Common.Installer.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationUpgrader.Install(IDictionary stateSaver)
       at Microsoft.Crm.Tools.Admin.OrganizationOperation.Execute()
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       --- End of inner exception stack trace ---
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.ImportAndUpgrade(OrganizationInfo organizationInfo)
       at Microsoft.Crm.Tools.Admin.ImportOrganizationInstaller.Execute(Object obj)
    22:23:10|   Info| GetDBUpdateRevisionThresholdForServer(): Threshold = 1992.


    Regards Milind


    • Edited by Milind007 Thursday, September 13, 2012 4:39 AM
    Thursday, September 13, 2012 4:34 AM
  • Hi,

    Go through the following steps to migrate 4.0 to 2011

    http://osmosee.wordpress.com/2011/07/11/upgrading-crm-4-0-to-crm-2011/


    Thanks & Regards, MS CRM Consultant, V.Surya. My Blog: http://inventcrm.wordpress.com/

    Thursday, September 13, 2012 12:21 PM
    Answerer
  • We have already followed the steps for creating CRM 2011 environment

    I have new CRM and SSRS server and using existing database server with new SQL server Intance for CRM 2011 installation.

    We have install CRM 2011 using above environment, taken the backup of 4.0 organization database and restored it on new Database Instance. While importing the 4.0 organization using DM, i am getting the error as shown in the log in my earlier post.

    i would be greatful if somebody helps me on resolving it.


    Regards Milind

    Friday, September 14, 2012 2:07 PM
  • Hi

    I have unregistered plug-ins which is register in CRM 4.0 and took the DB backup and restored it, till i am getting error while importing Organizations from CRM 4.0 to CRM 2011. Below is the error log:

    What could be the reason?

     

    22:23:10|   Info| CrmAction execution time; UpgradeDatabaseAction; 00:16:34.8686328

    22:23:10|  Error| Installer Complete: OrganizationUpgrader - Error encountered

    22:23:10|  Error| Exception occured during Microsoft.Crm.Tools.Admin.OrganizationUpgrader: Action Microsoft.Crm.Tools.Admin.UpgradeDatabaseAction failed.

    InnerException:

    System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.

       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)

       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)

       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)

       --- End of inner exception stack trace ---

       at System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)

       at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)

       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()

       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.Tools.Admin.InstallDatabaseAction.Do(IDictionary parameters)

       at Microsoft.Crm.Setup.Common.CrmAction.ExecuteAction(CrmAction action, IDictionary parameters, Boolean undo)

    InnerException:

    System.NullReferenceException: Object reference not set to an instance of an object.

       at Microsoft.Crm.Setup.DiffBuilder.AttributePass2Delete(AttributeMetadata currentAttribute, IMetadataActionSet metadataActionList)

       at Microsoft.Crm.Setup.DiffBuilder.ParseAttributes(Pass pass, IMetadataActionSet metadataActionList)

       at Microsoft.Crm.Setup.DiffBuilder.Pass2(String metadataLocation, String languageCode)

    Monday, September 17, 2012 10:56 AM
  • anybody know what is issues?


    Regards Milind

    Monday, September 24, 2012 6:56 PM