exm-error

Issue when installing Sitecore EXM with different index name

Had an issue earlier today when trying to install EXM 3.2.0 rev. 151020 to Sitecore 8.1 rev 151003

Server Error in ‘/’ Application.

Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)

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.RequiredObjectIsNullException: Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)

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:

[RequiredObjectIsNullException: Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)]
Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties) +1920
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +643
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +275
Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +579
Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration() +266
Sitecore.ContentSearch.SolrProvider.SolrContentSearchManager.get_Cores() +92
Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorSolrStartUp.Initialize() +44

[HttpException (0x80004005): Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)]
System.Web.HttpApplicationFactory.EnsureAppStartCalledForIntegratedMode(HttpContext context, HttpApplication app) +544
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +186
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +402
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343

[HttpException (0x80004005): Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +112
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712

The error message is a bit misleading as it turns out after looking into the Sitecore.EmailExperience.ContentManagement.config file, one of the index was referring to sitecore_suggested_test_index index which doesn’t exist (I’ve renamed it to something else as I was running multiple sitecore instances in my local machine).

There’s also a reference to sitecore_master_index in Sitecore.EmailExperience.Core.config file.

Rename those indexes to an existing indexes then you’ll be fine.

Hope this helps.

3 thoughts on “Issue when installing Sitecore EXM with different index name

  1. Same issue I encountered when I removed the -sitecore_web_index. My prj contain country specific indexes. Hence we don’t require this index. After removing this index while on build I am getting same error. How should I fix it

  2. Thank for the article which actually helped us to look for resolution in the right direction.

    I had a similar exception below:

    ERROR Error loading hook:
    Exception: Sitecore.Exceptions.RequiredObjectIsNullException
    Message: Could not find add method: AddIndex (type: Sitecore.ContentSearch.ContentSearchConfiguration)
    Source: Sitecore.Kernel
    at Sitecore.Configuration.DefaultFactory.AssignProperties(Object obj, Object[] properties)
    at Sitecore.Configuration.DefaultFactory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper)
    at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper)
    at Sitecore.Configuration.DefaultFactory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert)
    at Sitecore.Configuration.DefaultFactory.CreateObject(String configPath, String[] parameters, Boolean assert)
    at Sitecore.ContentSearch.ContentSearchManager.get_SearchConfiguration()
    at Sitecore.ContentSearch.Hooks.Initializer.Initialize()
    at Sitecore.Events.Hooks.HookManager.LoadAll()

    For us it turned out after looking into the Sitecore.EmailExperience.ContentManagement.config file, one of the index was referring to “sitecore_suggested_test_index” index which we had removed from the Content Delivery server using transformations. However we did not create transformation for EXM related configuration. As a result it turned out that the CD instance had both EXM’s CM config as well as CD config. Since “sitecore_suggested_test_index” was removed from CD instance, however due to the existence of CM config on the CD instance, the Sitecore was trying to locate “sitecore_suggested_test_index” and failed. Thus the exception.

    Later we realized that we had to configure EXM for CM and CD instance after following this article below which resolved the issue.

    https://doc.sitecore.net/email_experience_manager/setting_up_exm/configuration/the_exm_configuration_files

Leave a Reply

Your email address will not be published. Required fields are marked *