Gravatar for daniel.reedy@tcw.com

Question by Daniel Reedy, Apr 16, 2015 3:00 PM

Method not found: FieldFetcherFactory

I followed the instructions in Altering Search Results Before They Are Displayed in a Search Interface, but am getting this runtime error.

Coveo.SearchProvider.Rest.TCW.config:

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <pipelines>
      <coveoProcessParsedRestResponse>
        <processor type="Website.Classes.myTCW.Coveo.ProcessParsedRestResponse, Website" />
      </coveoProcessParsedRestResponse>
    </pipelines>
  </sitecore>
</configuration>

ProcessParsedRestResponse.cs:

namespace Website.Classes.myTCW.Coveo {
  public class ProcessParsedRestResponse : IProcessor<CoveoProcessParsedRestResponseArgs> {
    private static readonly ILog _log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
    public void Process(CoveoProcessParsedRestResponseArgs p_Args) {
      SearchResponse response = p_Args.ResponseContent;
      //virtually empty implementation
    }
  }
}

Error:

1084 10:56:13 ERROR Error loading hook: <hook type="Sitecore.ContentSearch.Hooks.Initializer, Sitecore.ContentSearch" patch:source="Sitecore.ContentSearch.config" xmlns:patch="http://www.sitecore.net/xmlconfig/" /> 
Exception: System.Reflection.TargetInvocationException 
Message: Exception has been thrown by the target of an invocation. 
Source: mscorlib 
 at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) 
 at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) 
 at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 
 at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) 
 at Sitecore.Configuration.Factory.AssignProperties(Object obj, Object[] properties) 
 at Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) 
 at Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) 
 at Sitecore.Configuration.Factory.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() 

Nested Exception 

Exception: System.MissingMethodException 
Message: Method not found: 'Void Coveo.AbstractLayer.FieldManagement.FieldFetcherFactory..ctor(Coveo.Framework.Databases.ISitecoreFactory, Sitecore.ContentSearch.IDocumentBuilderOptions, System.Collections.Generic.IEnumerable`1<System.String>, Coveo.Framework.Fields.ICoveoFieldMap)'. 
Source: Coveo.SearchProviderBase 
 at Coveo.SearchProvider.ProviderIndexBase.Initialize(IIndexDocumentPropertyMapper`1 p_DocumentTypeMapper) 
 at Coveo.SearchProvider.ProviderIndex.Initialize() 
 at Coveo.SearchProvider.Configuration.CoveoSearchConfiguration.AddIndex(ISearchIndex p_Index)
1 Reply
Gravatar for jflheureux@coveo.com

Answer by Jean-François L'Heureux, Apr 16, 2015 3:14 PM

From your stacktrace I suspect two possible causes:

  1. Whether you installed the wrong version of Coveo for Sitecore on your Sitecore instance. If your Sitecore instance is 7.5, you need to install the Coveo for Sitecore package with "75" in the file name. Same logic for other Sitecore versions.
  2. Whether you upgraded Coveo for Sitecore from a previous release and you didn't follow all the manual configuration change steps needed between your old release and your new release. For example, the FieldMap type has changed for Sitecore 7.2 in the March 2015 release of Coveo for Sitecore.

Can you answer those questions:

  • What is your Sitecore version with the revision number.
  • What is your Coveo for Sitecore version with the build number (complete file name of the package if possible).
  • Have you upgraded Coveo for Sitecore from a previous release? What was the original release?
Gravatar for daniel.reedy@tcw.com

Comment by Daniel Reedy, Apr 16, 2015 3:36 PM

Thank you for the helpful info.

  • we are on Sitecore.NET 7.2 (rev. 141226)
  • [Coveo for Sitecore 72 3.0 (995).zip] (this was a hotfix to 974)
  • before that, we had [Coveo for Sitecore 72 3.0 (974).zip]
  • before that, we may have had [Coveo for Sitecore 72 3.0 (955).zip] on this server, but I don't recall clearly

I will review the manual config steps…

Gravatar for jflheureux@coveo.com

Comment by Jean-François L'Heureux, Apr 16, 2015 3:54 PM

Looks like you upgraded to the March 2015 release (974/995) without following the manual upgrade steps I linked in my answer. Keep me updated after you apply the manual steps.

Gravatar for daniel.reedy@tcw.com

Comment by Daniel Reedy, Apr 16, 2015 5:31 PM

The manual steps were followed, and I just walked through all of them to verify.

I'm really stuck now, because Sitecore throws this same error any time I try to:

  • browse a Coveo Search Page
  • open Indexing Manager (before even being presented with list of indexes)
  • re-run the Coveo for Sitecore package

I tried removing all Coveo DLLs & configs, in order to get a clean install, but it threw a different error.

Help!

Gravatar for daniel.reedy@tcw.com

Comment by Daniel Reedy, Apr 16, 2015 6:07 PM

problem solved. I had accidentally deleted several Coveo DLLs from \bin, and didn't realize that my backup contained the Feb version:|

the essence of your answer led me to the solution; so I'm accepting it.

Ask a question