hmm interesting. file watchers are initialized manually in XML provider itself (at least in 11.3).
one trick would be to *explicitly* register implementation in IoC contsiner (for now).
Hi, I would say it is not about the FileXmlLocalizationProvider. The message is information that there is no implementation registered in the container and it is using the default implementation with default constructor instead. You can check this same behavior with Alloy site, for example with EPiServer.CMS version 11.3.4 and with the latest.
Your problem is the Find commerce module: EPiServer.Find.Commerce.FindCommerceInitializationModule. What if you add more info or debug logging from the EPiServer.Find.Commerce namespace to be able to see that way what might go wrong (guess from the log messages)? Are you absolutely sure that you have the correct dlls in bin folder after the upgrade?
from exception (haven't tried myself this combination) you can see that find module asks for types and creates instance of target type via SM and falls into XML provider constructor that requires file watcher as well to be specified. this is SM default constructor seelction policy - to try to use the most specific (with most arguments) constructor. this is interesting. might be worth trying out in sample project.
Another developer on the project... The error is happening right after the code calls
EPiServer.Framework.Initialization.InitializationEngine
Because of that we can't step in (in Visual Studio) to see where the code is failing to load the types. This isn't part of our custom code.
All dlls are up to date - believe me we have checked. Over and over.
just out of curiosity, what happens when you explicitly add file watcher to the IoC container? VS will not break (it's probably too early in the pipeline)..
Do you have an example of how we could do that? What's happening seems to be inside a Nuget package...
Thanks
Susan
You can take a look here, so basically make sure you clean bin folder and there is no configuration transformation that messes up the versions
Hi,
I have the same issue upgrading from cms 10 / commerce 11 to cms 11.9.0 and commerce 12.3.1 (latest versions). I do not get the Find related exceptions but does show the error for the IFileSystemWatcher. see log below
I tried a clean install of the epi versions mentioned, but that is working correclty.
2018-06-21 16:43:46,118 [1] INFO EPiServer.Framework.Internal.ActivatorUtilities: Failed to retrieve type 'EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider' from container container. Attempting to use default constructor.
EPiServer.ServiceLocation.ActivationException: Activation error occurred while trying to get instance of type FileXmlLocalizationProvider, key "" ---> StructureMap.StructureMapConfigurationException: No default Instance is registered and cannot be automatically determined for type 'EPiServer.Framework.FileSystem.IFileSystemWatcher'
There is no configuration specified for EPiServer.Framework.FileSystem.IFileSystemWatcher
1.) new FileXmlLocalizationProvider(*Default of VirtualPathProvider*, *Default of IFileSystemWatcher*, *Default of IHostingEnvironment*)
2.) EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider
3.) Instance of EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider
4.) Container.GetInstance(EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider)
at lambda_method(Closure , IBuildSession , IContext )
at StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
at StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
at StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
at StructureMap.Container.GetInstance(Type pluginType)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
--- End of inner exception stack trace ---
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at EPiServer.Framework.Internal.ActivatorUtilities.GetServiceOrCreateInstance(IServiceLocator locator, Type type)
EPiServer.ServiceLocation.ActivationException: Activation error occurred while trying to get instance of type FileXmlLocalizationProvider, key "" ---> StructureMap.StructureMapConfigurationException: No default Instance is registered and cannot be automatically determined for type 'EPiServer.Framework.FileSystem.IFileSystemWatcher'
There is no configuration specified for EPiServer.Framework.FileSystem.IFileSystemWatcher
1.) new FileXmlLocalizationProvider(*Default of VirtualPathProvider*, *Default of IFileSystemWatcher*, *Default of IHostingEnvironment*)
2.) EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider
3.) Instance of EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider
4.) Container.GetInstance(EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider)
at lambda_method(Closure , IBuildSession , IContext )
at StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
at StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
at StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
at StructureMap.Container.GetInstance(Type pluginType)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
--- End of inner exception stack trace ---
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at EPiServer.Framework.Internal.ActivatorUtilities.GetServiceOrCreateInstance(IServiceLocator locator, Type type)
2018-06-21 16:43:47,472 [1] INFO EPiServer.Framework.Internal.ActivatorUtilities: Failed to retrieve type 'EPiServer.Azure.Events.AzureEventProvider' from container container. Attempting to use default constructor.
EPiServer.ServiceLocation.ActivationException: Activation error occurred while trying to get instance of type AzureEventProvider, key "" ---> StructureMap.StructureMapConfigurationException: No default Instance is registered and cannot be automatically determined for type 'EPiServer.Azure.Events.Internal.IServiceBusSetup'
There is no configuration specified for EPiServer.Azure.Events.Internal.IServiceBusSetup
1.) new AzureEventProvider(*Default of AzureEventClientFactory*, *Default of EventsServiceKnownTypesLookup*, *Default of IServiceBusSetup*)
2.) EPiServer.Azure.Events.AzureEventProvider
3.) Instance of EPiServer.Azure.Events.AzureEventProvider
4.) Container.GetInstance(EPiServer.Azure.Events.AzureEventProvider)
at lambda_method(Closure , IBuildSession , IContext )
at StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
at StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
at StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
at StructureMap.Container.GetInstance(Type pluginType)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
--- End of inner exception stack trace ---
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at EPiServer.Framework.Internal.ActivatorUtilities.GetServiceOrCreateInstance(IServiceLocator locator, Type type)
EPiServer.ServiceLocation.ActivationException: Activation error occurred while trying to get instance of type AzureEventProvider, key "" ---> StructureMap.StructureMapConfigurationException: No default Instance is registered and cannot be automatically determined for type 'EPiServer.Azure.Events.Internal.IServiceBusSetup'
There is no configuration specified for EPiServer.Azure.Events.Internal.IServiceBusSetup
1.) new AzureEventProvider(*Default of AzureEventClientFactory*, *Default of EventsServiceKnownTypesLookup*, *Default of IServiceBusSetup*)
2.) EPiServer.Azure.Events.AzureEventProvider
3.) Instance of EPiServer.Azure.Events.AzureEventProvider
4.) Container.GetInstance(EPiServer.Azure.Events.AzureEventProvider)
at lambda_method(Closure , IBuildSession , IContext )
at StructureMap.Building.BuildPlan.Build(IBuildSession session, IContext context)
at StructureMap.SessionCache.GetObject(Type pluginType, Instance instance, ILifecycle lifecycle)
at StructureMap.SessionCache.GetDefault(Type pluginType, IPipelineGraph pipelineGraph)
at StructureMap.Container.GetInstance(Type pluginType)
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
--- End of inner exception stack trace ---
at EPiServer.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)
at EPiServer.Framework.Internal.ActivatorUtilities.GetServiceOrCreateInstance(IServiceLocator locator, Type type)
2018-06-21 16:43:47,954 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/DbLocalizationProvider.AdminUI.EPiServer'
2018-06-21 16:43:47,982 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/DbLocalizationProvider.AdminUI.EPiServer/module.config
2018-06-21 16:43:48,102 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='DbLocalizationProvider.AdminUI.EPiServer' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/DbLocalizationProvider.AdminUI.EPiServer/' ClientResourcePath='/EPiServer/DbLocalizationProvider.AdminUI.EPiServer/' Assemblies=[DbLocalizationProvider.AdminUI.EPiServer] Controllers=undefined]
2018-06-21 16:43:48,107 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/Find'
2018-06-21 16:43:48,114 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/Find/module.config
2018-06-21 16:43:48,184 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='Find' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/Find/' ClientResourcePath='/EPiServer/Find/' Assemblies=[EPiServer.Find.UI, EPiServer.Find.Blocks, EPiServer.Find.Cms, EPiServer.Find.Framework] Controllers=undefined]
2018-06-21 16:43:48,188 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Labs.LanguageManager'
2018-06-21 16:43:48,194 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Labs.LanguageManager/module.config
2018-06-21 16:43:48,213 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Labs.LanguageManager' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Labs.LanguageManager/' ClientResourcePath='/EPiServer/EPiServer.Labs.LanguageManager/3.1.4/' Assemblies=[EPiServer.Labs.LanguageManager] Controllers=undefined]
2018-06-21 16:43:48,218 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Packaging.UI'
2018-06-21 16:43:48,230 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Packaging.UI/module.config
2018-06-21 16:43:48,255 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Packaging.UI' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Packaging.UI/' ClientResourcePath='/EPiServer/EPiServer.Packaging.UI/3.4.0.0/' Assemblies=[EPiServer.Packaging, EPiServer.Packaging.UI] Controllers=undefined]
2018-06-21 16:43:48,259 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Forms.UI'
2018-06-21 16:43:48,271 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Forms.UI/module.config
2018-06-21 16:43:48,298 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Forms.UI' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Forms.UI/' ClientResourcePath='/EPiServer/EPiServer.Forms.UI/4.14.0/' Assemblies=[EPiServer.Forms.UI, EPiServer.Forms.Core] Controllers=undefined]
2018-06-21 16:43:48,303 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Forms'
2018-06-21 16:43:48,313 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Forms/module.config
2018-06-21 16:43:48,326 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Forms' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Forms/' ClientResourcePath='/EPiServer/EPiServer.Forms/4.14.0/' Assemblies=[EPiServer.Forms] Controllers=undefined]
2018-06-21 16:43:48,333 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/Commerce'
2018-06-21 16:43:48,343 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/Commerce/module.config
2018-06-21 16:43:48,369 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='Commerce' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/Commerce/' ClientResourcePath='/EPiServer/Commerce/12.3.1.0/' Assemblies=[EPiServer.Business.Commerce, EPiServer.Commerce.UI] Controllers=undefined]
2018-06-21 16:43:48,374 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Commerce.Shell'
2018-06-21 16:43:48,388 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Commerce.Shell/module.config
2018-06-21 16:43:48,404 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Commerce.Shell' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Commerce.Shell/' ClientResourcePath='/EPiServer/EPiServer.Commerce.Shell/12.3.1.0/' Assemblies=[EPiServer.Commerce.Shell] Controllers=undefined]
2018-06-21 16:43:48,409 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Commerce.UI.CustomerService'
2018-06-21 16:43:48,420 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Commerce.UI.CustomerService/module.config
2018-06-21 16:43:48,436 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Commerce.UI.CustomerService' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Commerce.UI.CustomerService/' ClientResourcePath='/EPiServer/EPiServer.Commerce.UI.CustomerService/12.3.1.0/' Assemblies=[EPiServer.Commerce.UI.CustomerService] Controllers=undefined]
2018-06-21 16:43:48,441 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Commerce.Shell.ManagerIntegration'
2018-06-21 16:43:48,452 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Commerce.Shell.ManagerIntegration/module.config
2018-06-21 16:43:48,468 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Commerce.Shell.ManagerIntegration' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Commerce.Shell.ManagerIntegration/' ClientResourcePath='/EPiServer/EPiServer.Commerce.Shell.ManagerIntegration/12.3.1.0/' Assemblies=[EPiServer.Commerce.Shell.ManagerIntegration] Controllers=undefined]
2018-06-21 16:43:48,474 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/EPiServer.Cms.TinyMce'
2018-06-21 16:43:48,485 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/EPiServer.Cms.TinyMce/module.config
2018-06-21 16:43:48,500 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='EPiServer.Cms.TinyMce' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/EPiServer.Cms.TinyMce/' ClientResourcePath='/EPiServer/EPiServer.Cms.TinyMce/2.4.0/' Assemblies=[EPiServer.Cms.TinyMce] Controllers=undefined]
2018-06-21 16:43:48,505 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/LanguageWire.Connector'
2018-06-21 16:43:48,510 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Reading manifest from: /EPiServer/LanguageWire.Connector/module.config
2018-06-21 16:43:48,524 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Found module: [ShellModule Name='LanguageWire.Connector' RouteBasePath='EPiServer/' ResourceBasePath='/EPiServer/LanguageWire.Connector/' ClientResourcePath='/EPiServer/LanguageWire.Connector/ClientResources/' Assemblies=[LanguageWire.Connectors.EpiServer] Controllers=undefined]
2018-06-21 16:43:48,530 [1] INFO EPiServer.Shell.Modules.ModuleFinder: Looking for module in '~/EPiServer/Shell'
Any thoughts?
cheers,
Pierre
can you paste fragment of <localization> element under <episerver.framework>?
Hi Valdis,
Thanks for your reply,
The <Localization> section is already under <epsierver.framework>.
thnx
Pierre
sorry for my lazyness in writing, but can you paste content of that element?
Hi,
I do have an update on this issue.
I created an episerver support ticket. After some forth and back emailing details and config settings, Episerver was able to reproduce this issue.
So they created a bug for it and hoping to fix it shortly. I haven't heard anything about it since yesterday. I expect some response this week.
cheers
Hi Valdis,
Sure, the content of the localization section looks like this:
<episerver.framework updateDatabaseSchema="true" createDatabaseSchema="true">
...
<localization fallbackBehavior="FallbackCulture, MissingMessage, Echo" fallbackCulture="en">
<providers>
<add name="db" type="DbLocalizationProvider.EPiServer.DatabaseLocalizationProvider, DbLocalizationProvider.EPiServer" />
<add virtualPath="~/Resources/LanguageFiles" name="languageFiles" type="EPiServer.Framework.Localization.XmlResources.FileXmlLocalizationProvider, EPiServer.Framework.AspNet" />
</providers>
</localization>
cheers,
Pierre
ok, so what was the root casue in configuration when they could repo the issue?
Not sure, they didn't say,
A clean install of CMS 11 and Commerce 12 does not reproduce the issue. Episerver and I tested it.
Only when upgrading from CMS 10 / Commerce 11 to CMS 11 and Commerce 12 the issue was reproduced. So I guess there is some configuration transformation not done correctly during the upgrade, or something else is interfering with code that handles the dependency injection for the types that are missing. The interfaces in question are moved from to a different assembly, episerver.framework.aspnet. Maybe the structuremap scanning does not include this new assembly or something..
Guess we'll know as soon as Episerver finds a cause.
I'll keep this issues updated.
cheers,
Hi,
EpiServer investigated the issue and reported it as a bug.
https://world.episerver.com/support/Bug-list/bug/CMS-11111
Cheers,
Pierre
Hello,
We are in the process of updating to EPiServer 11 and have ran into an issue after updating the database. I originally thought that this might be related to EPiServer Find (I have a post open there too), but looking at the error logs more I believe it may be related to StructureMap and EPiServer.Framework.
We are on versions EPiServer CMS 11.5.0, EPiServer Commerce 11.8.3, and EPiServer Find 12.7.1, EPiServer Find Commerce 10.1.2, EPiServer.ServiceLocation.StructureMap 2.0.1.0, StructureMap 4.6.1.0, and StructureMap.Web 1.0.0.0 (from the structuremap.web.4.0.0.315 folder).
Below are the errors and part of EPiServerFramework.config that I believe are related.
Error when trying to load the site after database upgrade:
Log Error:
The section in our EPiServerFramework.config file that I believe is causing the issue.
Thank you,
Kevin Larsen