Failed to install Episerver.Marketing.Testing 2.5.8

Fixed in

EPiServer.Marketing.Testing 2.5.9

Created

Apr 19, 2019

Updated

Apr 25, 2019

State

Closed, Fixed and tested


Description

Steps to reproduce:
1. Install an Alloy project from the visual studio
2. Install EPiServer.Marketing.Testing.2.5.8
3. Set this setting: createDatabaseSchema="true" updateDatabaseSchema="true" in the episerver.framework node
4. Build the project and start the site

Expect: the site works.
Actual: Exception displayed

[NullReferenceException: Object reference not set to an instance of an object.]
   EPiServer.Marketing.Testing.Core.Manager.TestManager.GetTestList(TestCriteria criteria) +70
   EPiServer.Marketing.Testing.Core.Manager.CachingTestManager.RefreshCache() +532
   EPiServer.Marketing.Testing.Core.Manager.CachingTestManager..ctor(ObjectCache cache, ICacheSignal remoteCacheSignal, DefaultMarketingTestingEvents events, ITestManager inner) +58
   EPiServer.Marketing.Testing.Web.Initializers.<>c.<ConfigureContainer>b__0_0(IServiceLocator serviceLocator) +216
   EPiServer.ServiceLocation.Internal.TypedFactory`1.<Create>b__2_0(IServiceLocator s) +13
   lambda_method(Closure , IBuildSession , IContext ) +181
 
[StructureMapBuildException: Failure while building 'Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Marketing.Testing.Core.Manager.ITestManager,EPiServer.Marketing.Testing.Core.Manager.ITestManager]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Marketing.Testing.Core.Manager.ITestManager])._serviceLocator)', check the inner exception for details
1.) Lambda: Invoke(value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1+<>c__DisplayClass11_0`1[EPiServer.Marketing.Testing.Core.Manager.ITestManager,EPiServer.Marketing.Testing.Core.Manager.ITestManager]).instanceAccessor, value(EPiServer.ServiceLocation.Internal.StructureMapConfiguredType`1[EPiServer.Marketing.Testing.Core.Manager.ITestManager])._serviceLocator)
2.) Instance of EPiServer.Marketing.Testing.Core.Manager.ITestManager
3.) Container.GetInstance(EPiServer.Marketing.Testing.Core.Manager.ITestManager)
4.) Container.TryGetInstance(EPiServer.Marketing.Testing.Core.Manager.ITestManager)
]
   lambda_method(Closure , IBuildSession , IContext ) +491
   StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context) +92
   StructureMap.BuildSession.BuildNewInSession(Type pluginType, Instance instance) +92
   StructureMap.BuildSession.BuildNewInOriginalContext(Type pluginType, Instance instance) +73
   StructureMap.Pipeline.LifecycleObjectCache.buildWithSession(Type pluginType, Instance instance, IBuildSession session) +14
   StructureMap.Pipeline.<>c__DisplayClass5_0.<Get>b__0(Int32 _) +27
   System.Collections.Concurrent.ConcurrentDictionary`2.GetOrAdd(TKey key, Func`2 valueFactory) +68
   StructureMap.Pipeline.LifecycleObjectCache.Get(Type pluginType, Instance instance, IBuildSession session) +117
   StructureMap.BuildSession.ResolveFromLifecycle(Type pluginType, Instance instance) +47
   StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle) +128
   StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph) +100
   StructureMap.Container.GetInstance(Type pluginType) +177
   StructureMap.Container.DoTryGetInstance(Type pluginType) +40
   StructureMap.Container.TryGetInstance(Type pluginType) +150
   EPiServer.ServiceLocation.StructureMapServiceLocator.DoTryGetExistingInstance(Type serviceType, String key, Object& instance) +44
   EPiServer.ServiceLocation.ServiceLocatorImplBase.TryGetExistingInstance(Type serviceType, String key, Object& instance) +15
   EPiServer.ServiceLocation.ServiceLocatorImplBase.TryGetExistingInstance(Type serviceType, Object& instance) +14
   EPiServer.ServiceLocation.ServiceLocatorExtensions.TryGetExistingInstance(IServiceLocator serviceLocator, TService& instance) +65
   EPiServer.Marketing.Testing.Web.SchemaUpdater.DatabaseVersionValidator.GetStatus(ConnectionStringsSection connectionStrings) +71
   EPiServer.Data.SchemaUpdates.Internal.SchemaUpdaterWrapper.GetStatus(IEnumerable`1 ConnectionStringOptions) +28
   EPiServer.Data.SchemaUpdates.Internal.<>c__DisplayClass6_0.<EnsureDatabaseSchema>b__0(ISchemaUpdater u) +35
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +164
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +445
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +54
   EPiServer.Data.SchemaUpdates.Internal.DatabaseSchemaManagerImplementation.EnsureDatabaseSchema(DataAccessOptions dataAccessOptions) +133
   EPiServer.Data.DataInitialization.ValidateDatabaseSchema(InitializationEngine context) +85
   EPiServer.Data.DataInitialization.Initialize(InitializationEngine context) +25
   EPiServer.Framework.Initialization.Internal.<>c__DisplayClass2_0.<Initialize>b__0() +19
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +52
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +80
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +179
 
[InitializationException: Initialize action failed for Initialize on class EPiServer.Data.DataInitialization, EPiServer.Data, Version=11.11.3.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +492
   EPiServer.Framework.Initialization.InitializationEngine.ExecuteTransition(Boolean continueTransitions) +153
   EPiServer.Framework.Initialization.InitializationEngine.Initialize() +40
   EPiServer.Framework.Initialization.<>c.<FrameworkInitialization>b__7_0(InitializationEngine e) +9
   EPiServer.Framework.Initialization.InitializationModule.EngineExecute(HostType hostType, Action`1 engineAction) +461
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +170
   EPiServer.Global..ctor() +44
   AlloySite20190419.EPiServerApplication..ctor() +29
   ASP.global_asax..ctor() in c:\Users\dkph\AppData\Local\Temp\Temporary ASP.NET Files\vs\ef818ee5\5ff19b30\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) +119
   System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean skipCheckThis, Boolean fillCache, StackCrawlMark& stackMark) +232
   System.Activator.CreateInstance(Type type, Boolean nonPublic) +83
   System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes, StackCrawlMark& stackMark) +1088
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +124
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +20
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +59
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +148
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +303
 
[HttpException (0x80004005): Exception has been thrown by the target of an invocation.]
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +659
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +89
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +188