【问题标题】:Sitecore 8.2 : Solr is not working giving errorSitecore 8.2:Solr 无法正常工作并给出错误
【发布时间】:2020-01-27 16:37:55
【问题描述】:

我正在使用 Sitecore 8.2 更新 5。

现在使用https://sitecorerockz.wordpress.com/2018/08/01/lucene-to-solr/ 中提到的步骤从 Lucene 切换到 Solr 6.6.3

我创建了一个诊断页面来检查 Solr 是否正常工作,我收到以下错误 (screenshot):

Exception Details: Ninject.ActivationException: Error activating ISolrOperations{Dictionary{string, Object}}
No matching bindings are available, and the type is not self-bindable.
Activation path:
 1) Request for ISolrOperations{Dictionary{string, Object}}

Suggestions:
 1) Ensure that you have defined a binding for ISolrOperations{Dictionary{string, Object}}.
 2) If the binding was defined in a module, ensure that the module has been loaded into the kernel.
 3) Ensure you have not accidentally created more than one kernel.
 4) If you are using constructor arguments, ensure that the parameter name matches the constructors parameter name.
 5) If you are using automatic module loading, ensure the search path and filters are correct.

来源错误:

protected override object DoGetInstance(Type serviceType, string key) {
  return _kernel.Get(serviceType, key); 
}

【问题讨论】:

  • 我使用的是 Solr 6.6.3。之前这个项目是 Sitecore 6.X 版本,不时升级,现在它是 Sitecore 8.2。

标签: solr lucene sitecore


【解决方案1】:

我收到以下异常

Solr Indexes Microsoft.Practices.ServiceLocation.ActivationException:尝试获取 IsolrOperations`1 类型的实例时发生激活错误,键“sitecore_analytics_index”---> Ninject.ActivationException:激活 IsolrOperations{Dictionary{string, Object}} 时出错没有匹配的绑定可用,并且该类型不可自绑定。激活路径:1) 请求 IsolrOperations{Dictionary{string, Object}} 建议:1) 确保您已定义 IsolrOperations{Dictionary{string, Object}} 的绑定。 2) 如果绑定是在模块中定义的,请确保该模块已加载到内核中。 3) 确保您没有意外创建多个内核。 4) 如果您使用构造函数参数,请确保参数名称与构造函数参数名称匹配。 5) 如果您使用自动模块加载,请确保搜索路径和过滤器正确。在 C:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs 中的 Ninject.KernelBase.Resolve(IRequest 请求):Ninject.ResolutionExtensions.Get(IResolutionRoot 根,类型服务,字符串名称,IParameter[] 参数的第 376 行) 在 c:\Projects\Ninject\ninject\src\Ninject\Syntax\ResolutionExtensions.cs:C:\test_Git\Sitecore\src\ 中 MyLibrary.test.Infrastructure.NinjectServiceLocator.DoGetInstance(Type serviceType, String key) 的第 164 行test\Infrastructure\NinjectServiceLocator.cs: 第 15 行 Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs :line 49 --- 内部异常堆栈跟踪结束 --- 在 c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices 中的 Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key)。 ServiceLocation\ServiceLocatorImplBase.cs:Microsoft.Pract 的第 53 行ices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService](String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize 的第 103 行() 在 ASP._Page_sitecore_admin_solr_diagnostic_cshtml.Execute() 在 c:\test_Git\Sitecore\build\25Sep2019\Website\sitecore\admin\solr-diagnostic.cshtml:line 29

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-12-21
    • 1970-01-01
    • 2019-08-21
    • 1970-01-01
    • 2021-02-08
    相关资源
    最近更新 更多