Try our conversational search powered by Generative AI!

Initialization Error after migrating CMS DB from 7.5 to 11

Vote:
 

Hi,

I have upgraded my solution from 7.5 to the 11.x offering and the website is working fine in the local environment. Today when I deployed the code to the code to our sandbox environment and trying to migrate the sandbox DB, I ran into this error. I was successfully able to migrate the dev DB without getting into this error. 

Any help on this please.

[NullReferenceException: Object reference not set to an instance of an object.]
   EpiCommerceFramework.Web.PageType.AccntMgmtPage_DynamicProxy.MakeReadOnly() +66
   EPiServer.Construction.Internal.ContentFactory.CreateContent(ContentType contentType, BuildingContext buildingContext) +342
   EPiServer.Commerce.Catalog.Provider.Construction.Internal.CatalogContentFactory.CreateContent(ContentType contentType, BuildingContext buildingContext) +179
   EPiServer.DataAccess.Internal.ContentDB.CreateContent(ContentType contentType) +13
   EPiServer.DataAccess.Internal.ContentLoadDB.LoadContentInternal(ContentReference contentLink, Int32 languageBranchId, DbDataReader reader) +278
   EPiServer.DataAccess.Internal.<>c__DisplayClass4_0.<LoadVersion>b__0() +461
   EPiServer.Data.Providers.Internal.<>c__DisplayClass31_0`1.<Execute>b__0() +57
   EPiServer.Data.Providers.SqlTransientErrorsRetryPolicy.Execute(Func`1 method) +69
   EPiServer.Core.<>c__DisplayClass121_0.<LoadContentFromCacheOrRepository>b__0() +34
   EPiServer.Framework.Cache.ObjectInstanceCacheExtensions.ReadThroughWithWait(IObjectInstanceCache cache, String cacheKey, Func`1 readValue, Func`2 evictionPolicy) +1023
   EPiServer.Core.Internal.ContentInstanceCache.ReadThrough(ContentReference contentLink, String selectedLanguage, Func`1 readValue) +107
   EPiServer.Core.ContentProvider.LoadContentFromCacheOrRepository(ContentReference contentreference, ILanguageSelector selector) +602
   EPiServer.Core.Internal.ProviderPipelineImplementation.GetItem(ContentProvider provider, ContentReference contentLink, LoaderOptions loaderOptions) +309
   EPiServer.Core.Internal.DefaultContentLoader.TryGet(ContentReference contentLink, LoaderOptions loaderOptions, T& content) +574
   EPiServer.Core.Internal.DefaultContentLoader.Get(ContentReference contentLink, LoaderOptions loaderOptions) +99
   EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.ValidateChangeOfModelType(PropertyDefinitionModel propertyModel, String modelName) +313
   EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.SetStateForPropertyDefinitionModels(ContentTypeModel model) +177
   EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.<AnalyzeProperties>b__15_0(ContentTypeModel model) +67
   System.Threading.Tasks.<>c__DisplayClass17_0`1.<ForWorker>b__1() +1224
   System.Threading.Tasks.Task.InnerInvokeWithArg(Task childTask) +32
   System.Threading.Tasks.<>c__DisplayClass176_0.<ExecuteSelfReplicating>b__0(Object ) +272

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task.ThrowIfExceptional(Boolean includeTaskCanceledExceptions) +4751668
   System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken) +14351601
   System.Threading.Tasks.Parallel.ForWorker(Int32 fromInclusive, Int32 toExclusive, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Func`4 bodyWithLocal, Func`1 localInit, Action`1 localFinally) +1402
   System.Threading.Tasks.Parallel.ForEachWorker(IEnumerable`1 source, ParallelOptions parallelOptions, Action`1 body, Action`2 bodyWithState, Action`3 bodyWithStateAndIndex, Func`4 bodyWithStateAndLocal, Func`5 bodyWithEverything, Func`1 localInit, Action`1 localFinally) +367
   System.Threading.Tasks.Parallel.ForEach(IEnumerable`1 source, Action`1 body) +158
   EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelRegister.AnalyzeProperties() +105
   EPiServer.DataAbstraction.RuntimeModel.Internal.ContentTypeModelScanner.Sync(Boolean commitChanges) +298
   EPiServer.Initialization.Internal.ModelSyncInitialization.Initialize(InitializationEngine context) +561
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +58
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +123
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +248

[InitializationException: Initialize action failed for Initialize on class EPiServer.Initialization.Internal.ModelSyncInitialization, EPiServer, Version=11.19.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +800
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +194
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +876
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +225
   EPiServer.Global..ctor() +42
   ASP.global_asax..ctor() in c:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files\root\1818bc9b\9098cb3a\App_global.asax.0.cs:0

[TargetInvocationException: Exception has been thrown by the target of an invocation.]
   System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandleInternal& ctor, Boolean& bNeedSecurityCheck) +0
   System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +139
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +105
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1431
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +184
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +27
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +79
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +178
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +341

[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +523
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +107
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +688
#253360
Edited, Apr 16, 2021 16:33
Vote:
 

Is your AccntMgmtPage a catalog content type?

#253541
Apr 19, 2021 10:21
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.