SaaS CMS has officially launched! Learn more now.

StructureMap error when accessing /episerver/cms

Vote:
 

Hi.

After an upgrade of System.Web.Mvc from v5.2.2 to v.5.2.3 I'm getting the following error:

StructureMap Exception Code: 202

No Default Instance defined for PluginFamily EPiServer.DataAbstraction.IContentTypeRepository`1[[EPiServer.DataAbstraction.BlockType, EPiServer, Version=8.11.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]], EPiServer, Version=8.11.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7

Our StructureMapModule has a module dependency and is an InitializableModule, so StructureMap should be configured correctly, as it has always worked before. No changes there.

Also, here's the full stack trace:

[StructureMapException: StructureMap Exception Code:  202
No Default Instance defined for PluginFamily EPiServer.DataAbstraction.IContentTypeRepository`1[[EPiServer.DataAbstraction.BlockType, EPiServer, Version=8.11.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]], EPiServer, Version=8.11.0.0, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   StructureMap.BuildSession.<.ctor>b__0(Type t) in c:\BuildAgent\work\767273992e840853\src\StructureMap\BuildSession.cs:33
   StructureMap.Util.Cache`2.get_Item(KEY key) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Util\Cache.cs:83
   StructureMap.BuildSession.CreateInstance(Type pluginType) in c:\BuildAgent\work\767273992e840853\src\StructureMap\BuildSession.cs:215
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:103
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:69
   StructureMap.Pipeline.ConstructorInstance.Get(String propertyName, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ConstructorInstance.cs:79
   lambda_method(Closure , IArguments ) +163
   StructureMap.Construction.<>c__DisplayClass2.b__0(IArguments args) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Construction\BuilderCompiler.cs:56
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ConstructorInstance.cs:237
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:103
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:69
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ObjectBuilder.cs:27
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) in c:\BuildAgent\work\767273992e840853\src\StructureMap\BuildSession.cs:176
   System.Linq.<>c__DisplayClass7_0`3.b__0(TSource x) +20
   System.Linq.WhereSelectArrayIterator`2.MoveNext() +80
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +524
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +70
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:103
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:69
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:103
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:69
   StructureMap.Pipeline.ConstructorInstance.Get(String propertyName, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ConstructorInstance.cs:79
   lambda_method(Closure , IArguments ) +57
   StructureMap.Construction.<>c__DisplayClass2.b__0(IArguments args) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Construction\BuilderCompiler.cs:56
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ConstructorInstance.cs:237
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:103
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:69
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ObjectBuilder.cs:27
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) in c:\BuildAgent\work\767273992e840853\src\StructureMap\BuildSession.cs:176
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:103
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:69
   StructureMap.Pipeline.ConstructorInstance.Get(String propertyName, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ConstructorInstance.cs:79
   lambda_method(Closure , IArguments ) +159
   StructureMap.Construction.<>c__DisplayClass2.b__0(IArguments args) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Construction\BuilderCompiler.cs:56
   StructureMap.Pipeline.ConstructorInstance.Build(Type pluginType, BuildSession session, IInstanceBuilder builder) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ConstructorInstance.cs:237
   StructureMap.Pipeline.Instance.createRawObject(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:103
   StructureMap.Pipeline.Instance.Build(Type pluginType, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\Instance.cs:69
   StructureMap.Pipeline.ObjectBuilder.Resolve(Type pluginType, Instance instance, BuildSession session) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Pipeline\ObjectBuilder.cs:27
   StructureMap.BuildSession.CreateInstance(Type pluginType, Instance instance) in c:\BuildAgent\work\767273992e840853\src\StructureMap\BuildSession.cs:176
   StructureMap.BuildSession.CreateInstanceArray(Type pluginType, Instance[] instances) in c:\BuildAgent\work\767273992e840853\src\StructureMap\BuildSession.cs:201
   StructureMap.Container.GetAllInstances(Type pluginType) in c:\BuildAgent\work\767273992e840853\src\StructureMap\Container.cs:310
   EPiServer.ServiceLocation.d__0.MoveNext() +107
   EPiServer.ServiceLocation.d__0`1.MoveNext() +208
   System.Linq.WhereEnumerableIterator`1.MoveNext() +108
   System.Linq.Lookup`2.Create(IEnumerable`1 source, Func`2 keySelector, Func`2 elementSelector, IEqualityComparer`1 comparer) +183
   System.Linq.GroupedEnumerable`3.GetEnumerator() +87
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +83
   System.Linq.Buffer`1..ctor(IEnumerable`1 source) +153
   System.Linq.d__1.MoveNext() +229
   System.Linq.WhereSelectEnumerableIterator`2.MoveNext() +118
   System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) +452
   System.Linq.Enumerable.ToList(IEnumerable`1 source) +70
   EPiServer.Cms.Shell.UI.Components.Tasks.CreateComponent() +795
   EPiServer.Shell.ViewComposition.IContainerExtensions.AddComponentsRecursive(IContainer container, String viewName, IEnumerable`1 pluggableComponents, IPrincipal principal) +293
   EPiServer.Shell.ViewComposition.IContainerExtensions.AddComponentsRecursive(IContainer container, String viewName, IEnumerable`1 pluggableComponents, IPrincipal principal) +603
   EPiServer.Shell.ViewComposition.IContainerExtensions.AddComponentsRecursive(IContainer container, String viewName, IEnumerable`1 pluggableComponents, IPrincipal principal) +603
   EPiServer.Shell.ViewComposition.IContainerExtensions.AddComponentsRecursive(IContainer container, String viewName, IEnumerable`1 pluggableComponents, IPrincipal principal) +603
   EPiServer.Shell.ViewComposition.DefaultViewManager.CreateView(String viewName, IPrincipal principal) +415
   EPiServer.Shell.UI.Bootstrapper.CreateViewModel(String viewName, ControllerContext context, String moduleName) +92
   EPiServer.Shell.UI.Controllers.EPiDefaultShellModuleController.Index(ShellModule module, String controller) +110
   lambda_method(Closure , ControllerBase , Object[] ) +191
   System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext, IDictionary`2 parameters) +229
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext, ActionDescriptor actionDescriptor, IDictionary`2 parameters) +35
   System.Web.Mvc.<>c__DisplayClass15.b__12() +80
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.ControllerActionInvoker.InvokeActionMethodFilter(IActionFilter filter, ActionExecutingContext preContext, Func`1 continuation) +453
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +982
   System.Web.Mvc.Controller.ExecuteCore() +129
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +236
   EPiServer.Shell.Web.Mvc.ModuleMvcHandler.ProcessController(IController controller) +50
   EPiServer.Shell.Web.Mvc.ModuleMvcHandler.BeginProcessRequest(HttpContextBase httpContext, AsyncCallback callback, Object state) +28
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +1162
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +146

 

I've seen similar errors before, and it sometimes doesn't involve StructureMap at all because of a deeper error somewhere.

Have anyone else experienced this error before?

#151697
Aug 04, 2016 9:54
Vote:
 

I'm running 5.2.3.0 of System.Web.Mvc as well without error with the same initializable modules but I'm on the latest 9.12.0.0 version of EPiServer.

  • Are you able to try updating your EPiServer?
  • Is your structuremap on the latested for your version of EPiServer?
  • When you udated the package did it update any other dependancies?
#151705
Aug 04, 2016 11:33
Vote:
 

OK. That's atleast good to know.

As for answering your questions:

  • I'm not able to update EPiServer right now.
  • Yes. To be specific the version is v2.6.4.1.
  • Well. System.Web.Mvc is dependant on Microsoft.AspNet.WebPages and Microsoft.AspNet.Razor and these had to be upped as well (minor version).

Another interesting find is that /episerver, /episerver/cms/admin and other modules works. It's only the edit view which doesn't work. Seems like EPiServer can't initialize correctly in the edit view.

#151712
Edited, Aug 04, 2016 13:10
* 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.