RESOLVED: Sitecore Solr provider error: Value cannot be null. Parameter name: fieldNameTranslator.
Server
Error in '/' Application.
Value cannot be null.
Parameter name: fieldNameTranslator
Parameter name: fieldNameTranslator
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: System.ArgumentNullException: Value cannot be null.
Parameter name: fieldNameTranslator
Source Error:
Exception Details: System.ArgumentNullException: Value cannot be null.
Parameter name: fieldNameTranslator
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:
| 
[ArgumentNullException: Value cannot be null. 
Parameter name: fieldNameTranslator] 
   Sitecore.ContentSearch.Linq.Solr.SolrIndexParameters..ctor(IIndexValueFormatter
  valueFormatter, IFieldQueryTranslatorMap`1 fieldQueryTranslators,
  FieldNameTranslator fieldNameTranslator, IExecutionContext[] executionContexts,
  IFieldMapReaders fieldMap, Boolean convertQueryDatesToUtc) +310 
  
  Sitecore.ContentSearch.SolrProvider.LinqToSolrIndex`1..ctor(SolrSearchContext
  context, IExecutionContext[] executionContexts) +192 
  
  Sitecore.ContentSearch.SolrProvider.SolrSearchContext.GetQueryable(IExecutionContext[]
  executionContexts) +83 
  
  Sitecore.ContentTesting.ContentSearch.TestingSearch.GetRunningTestsWithDataSourceItem(Item
  dataSourceItem) +875 
  
  Sitecore.ContentTesting.Pipelines.GetContentEditorWarnings.GetContentTestingWarnings.Process(GetContentEditorWarningsArgs
  args) +328 
   (Object , Object[] )
  +80 
  
  Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365 
  
  Sitecore.Shell.Applications.ContentManager.Editor.GetWarnings(Boolean
  hasSections) +271 
  
  Sitecore.Shell.Applications.ContentManager.Editor.Render(RenderContentEditorArgs
  args, Control parent) +178 
  
  Sitecore.Shell.Applications.ContentManager.ContentEditorForm.RenderEditor(Item
  item, Item root, Control parent, Boolean showEditor) +231 
  
  Sitecore.Shell.Applications.ContentManager.ContentEditorForm.UpdateEditor(Item
  folder, Item root, Boolean showEditor) +367 
  
  Sitecore.Shell.Applications.ContentManager.ContentEditorForm.Update()
  +407 
  
  Sitecore.Shell.Applications.ContentManager.ContentEditorForm.OnPreRendered(EventArgs
  e) +212 
[TargetInvocationException: Exception has been thrown by the
  target of an invocation.] 
  
  System.RuntimeMethodHandle.InvokeMethod(Object target, Object[]
  arguments, Signature sig, Boolean constructor) +0 
  
  System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj,
  Object[] parameters, Object[] arguments) +76 
  
  System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags
  invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211 
  
  System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
  +35 
  
  Sitecore.Reflection.ReflectionUtil.CallMethod(Type type, Object obj,
  String methodName, Boolean includeNonPublic, Boolean includeInherited,
  Object[] parameters) +37 
  
  Sitecore.Reflection.ReflectionUtil.CallMethod(Object obj, String methodName,
  Boolean includeNonPublic, Boolean includeInherited, Object[] parameters) +66 
  
  Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs
  e) +117 
   System.Web.UI.Control.PreRenderRecursiveInternal()
  +113 
   System.Web.UI.Page.ProcessRequestMain(Boolean
  includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297 | 
If you ran into the above error during Solr integration with Sitecore, you more than likely missed the step where you needed to configure an IOC for Sitecore. If so, go through sections 3.3, 3.4 of the Search and Scaling Guide.
Essentially, you need to pick the correct DI framework dll and drop it into Bin (Castle Windsor more than likely) and do the following:
Open the Global.asax file and in the first line, replace the following: Inherits="Sitecore.Web.Application" With Inherits="Sitecore.ContentSearch.SolrProvider.CastleWindsorIntegration.WindsorApplication"
IOC Containers
Autofac
<%@Application Language='C#' Inherits="Sitecore.ContentSearch.SolrProvider.AutoFacIntegration.AutoFacApplication" %>
Ninject
<%@Application Language='C#' ' Inherits="Sitecore.ContentSearch.SolrProvider.NinjectIntegration.NinjectApplication" %>
StructureMap
<%@Application Language='C#' ' Inherits="Sitecore.ContentSearch.SolrProvider.StructureMapIntegration.StructureMapApplication" %>
Unity
<%@Application Language='C#' Inherits="Sitecore.ContentSearch.SolrProvider.UnityIntegration.UnityApplication
NOTE: Do not forget to deploy any and all dependent assemblies mentioned in the Search and Scaling guide.
Update: Latest documentation from Solr on how to configure Solr can be found here.
Update: Latest documentation from Solr on how to configure Solr can be found here.
Comments
Post a Comment