Dieses Blog durchsuchen

Mittwoch, 19. Februar 2014

Sitecore: Sitecore.Data.Database. No matching constructor was found.

I had this error in a deployment package for the CD = Content Delivery Server.

Server Error in '/' Application.


Could not create instance of type: Sitecore.Data.Database. No matching constructor was found.

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: Sitecore.Exceptions.ConfigurationException: Could not create instance of type: Sitecore.Data.Database. No matching constructor was found.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.

Stack Trace:


[ConfigurationException: Could not create instance of type: Sitecore.Data.Database. 

No matching constructor was found.]
   Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, 
String[] parameters, Boolean assert) +394
   Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, 
   Sitecore.Configuration.Factory.CreateObject(String configPath, String[] 
parameters, Boolean assert) +420
   Sitecore.Configuration.Factory.GetDatabase(String name, Boolean assert) +185
   Sitecore.Configuration.Factory.GetDatabases() +168
   Sitecore.Data.Managers.HistoryManager.InitializeEventHandlers() +49
   Sitecore.Pipelines.Loader.InitializeManagers.Process(PipelineArgs args) +16
   (Object , Object[] ) +80
   Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
   Sitecore.Nexus.Web.HttpModule.Application_Start() +175
   Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +516
   System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, 
   System.Web.HttpApplication.InitSpecial(HttpApplicationState state, 
   System.Web.HttpApplicationFactory.GetSpecialApplicationInstance
(IntPtr appContext, HttpContext context) +404
   System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475

[HttpException (0x80004005): Could not create instance of type: Sitecore.Data.Database. 
   System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12968244
   System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
   System.Web.HttpRuntime.ProcessRequestNotificationPrivate
(IIS7WorkerRequest wr, HttpContext context) +12807949



Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446



Solution Info:

One thing we were sure that this is something to do with master DB only. So, we started looking at config file’s under App_Config folder and here’s our HERO — Sitecore.Buckets.config:
1
2
3
4
5
6
7
8
9
10
11
12
13
<databases>
      <database id="master" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
        <Engines.DataEngine.Commands.AddFromTemplatePrototype>
          <obj type="Sitecore.Buckets.Commands.AddFromTemplateCommand, Sitecore.Buckets" />
        </Engines.DataEngine.Commands.AddFromTemplatePrototype>
      </database>
      <database id="web" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
        <Engines.DataEngine.Commands.AddFromTemplatePrototype>
          <obj type="Sitecore.Buckets.Commands.AddFromTemplateCommand, Sitecore.Buckets" />
        </Engines.DataEngine.Commands.AddFromTemplatePrototype>
      </database>
    </databases>
    <events>
So, we commented out master DB’s Configuration and here’s how it looks like:
1
2
3
4
5
6
7
8
9
10
11
12
<databases>
<!--<database id="master" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
<Engines.DataEngine.Commands.AddFromTemplatePrototype>
<obj type="Sitecore.Buckets.Commands.AddFromTemplateCommand, Sitecore.Buckets" />
</Engines.DataEngine.Commands.AddFromTemplatePrototype>
</database>-->
<database id="web" singleInstance="true" type="Sitecore.Data.Database, Sitecore.Kernel">
<Engines.DataEngine.Commands.AddFromTemplatePrototype>
<obj type="Sitecore.Buckets.Commands.AddFromTemplateCommand, Sitecore.Buckets" />
</Engines.DataEngine.Commands.AddFromTemplatePrototype>
</database>
</databases>
And Yes, It resolved our error,