No Default Instance defined for PluginFamily EPiServer.BaseLibrary.IRuntimeCache

Vote:
 

Hi all,

I have upgraded a site from CMS 6 to 7 using Deployment Center and converted the code from using PageTypeBuilder to using new strongly typed EPiServer way, replaced all DLL's with fresh new EPiServer 7 DLL's.

The solution builds without errors, but I am getting this error:

No Default Instance defined for PluginFamily EPiServer.BaseLibrary.IRuntimeCache

StructureMap Exception Code:  202
No Default Instance defined for PluginFamily EPiServer.BaseLibrary.IRuntimeCache, EPiServer.BaseLibrary, Version=7.0.586.1, Culture=neutral, PublicKeyToken=8fe83dea738b45b7

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. 

Exception Details: StructureMap.StructureMapException: StructureMap Exception Code:  202
No Default Instance defined for PluginFamily EPiServer.BaseLibrary.IRuntimeCache, EPiServer.BaseLibrary, Version=7.0.586.1, Culture=neutral, PublicKeyToken=8fe83dea738b45b7

Source Error: 

The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:

1. Add a "Debug=true" directive at the top of the file that generated the error. Example:

  <%@ Page Language="C#" Debug="true" %>

or:

2) Add the following section to the configuration file of your application:

<configuration>
   <system.web>
       <compilation debug="true"/>
   </system.web>
</configuration>

Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.

Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.


Stack Trace: 

[StructureMapException: StructureMap Exception Code:  202
No Default Instance defined for PluginFamily EPiServer.BaseLibrary.IRuntimeCache, EPiServer.BaseLibrary, Version=7.0.586.1, Culture=neutral, PublicKeyToken=8fe83dea738b45b7]
   StructureMap.BuildSession.<.ctor>b__0(Type t) +162
   StructureMap.Util.Cache`2.get_Item(KEY key) +155
   StructureMap.BuildSession.CreateInstance(Type pluginType) +12
   StructureMap.Container.GetInstance(Type pluginType) +80
   EPiServer.ServiceLocation.StructureMapServiceLocator.DoGetInstance(Type serviceType, String key) +40
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +42

[ActivationException: Activation error occurred while trying to get instance of type IRuntimeCache, key ""]
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) +101
   EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance() +60
   EPiServer.CacheManager.get_RuntimeCache() +76
   EPiServer.StaticCacheKey..ctor(String keyName) +40
   EPiServer.DataFactoryCache..cctor() +46

[TypeInitializationException: The type initializer for 'EPiServer.DataFactoryCache' threw an exception.]
   EPiServer.DataFactoryCache.Initialize(IContentLoader contentLoader, IContentProviderManager pageProviderManager, IContentEvents contentEvents) +52
   EPiServer.Initialization.<>c__DisplayClass5.<Initialize>b__0() +167
   System.Threading.Tasks.Task.InnerInvoke() +72
   System.Threading.Tasks.Task.Execute() +49

[AggregateException: One or more errors occurred.]
   System.Threading.Tasks.Task.WaitAll(Task[] tasks, Int32 millisecondsTimeout, CancellationToken cancellationToken) +1080
   EPiServer.Initialization.CmsCoreInitialization.Initialize(InitializationEngine context) +877
   EPiServer.Framework.Initialization.<>c__DisplayClass5.<Initialize>b__4() +19
   EPiServer.Framework.Initialization.ModuleNode.Execute(Action a, String key) +43
   EPiServer.Framework.Initialization.ModuleNode.Initialize(InitializationEngine context) +80
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +349
   EPiServer.Framework.Initialization.InitializationEngine.Initialize(HostType hostType) +118
   EPiServer.Framework.Initialization.InitializationModule.Initialize(HostType hostType) +353
   EPiServer.Framework.Initialization.InitializationModule.FrameworkInitialization(HostType hostType) +82
   EPiServer.Global..ctor() +79
   DNO.Web.Global..ctor() +28
   ASP.global_asax..ctor() +5

[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) +113
   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) +1136
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +128
   System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture) +18
   System.Web.HttpRuntime.CreateNonPublicInstance(Type type, Object[] args) +60
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +260
   System.Web.HttpApplicationFactory.FireApplicationOnStart(HttpContext context) +34
   System.Web.HttpApplicationFactory.EnsureAppStartCalled(HttpContext context) +184
   System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +92
   System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +525

 

Have anyone seen this before?

#73759
Aug 08, 2013 11:10
Vote:
 

Not having investigated why, I see that removing my <remove assembly>-lines in EPiServerFramework.config eliminates this error.

#73763
Edited, Aug 08, 2013 12:49
Vote:
 

Anders,

i could not locate"my -lines" in EPiServerFramework.config file.

please advise.

Regards

Gunjan

#113042
Nov 11, 2014 14:48
Vote:
 

Hi Anders, 
I know it's old topic, are you able to recall what did you remove from EPiServerFramework.config?
I'm currently struggling with the same issue. It seems to be happening randomly, but when it does happen - it's breaking our long running EPi job.

regards,
Marek


#114684
Dec 18, 2014 10:47
Vote:
 

Hi Marek,

Sorry, don't recall. As I read my old post I see that I must have forgotten something in my answer..

Have you tried removing everything from <scanAssembly forceBinFolderScan="true"> so it looks like this:

<scanAssembly forceBinFolderScan="true">
<add assembly="*" />
</scanAssembly>

#114685
Dec 18, 2014 10:56
Vote:
 

Hi Anders, 
thank you for such fast response. I'll definitely give it a try. Our job is running for past few hours without an error, which is strange after few previous unsuccessful tries.

thanks

#114700
Dec 18, 2014 14:54
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.