Sitecore 8.2:Solr无法正常工作并给出错误 [英] Sitecore 8.2 : Solr is not working giving error

查看:229
本文介绍了Sitecore 8.2:Solr无法正常工作并给出错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Sitecore 8.2更新5.

I am using Sitecore 8.2 update 5.

现在使用我创建了一个诊断页来检查Solr是否正常工作,但出现以下错误(屏幕截图):

I created a diagnostic page to check if Solr is working or not, I got the below error (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索引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.ResolutionExtensions.Get(IResolutionRoot根,类型服务,字符串名称,IParameter []参数的Ninject.KernelBase.Resolve(IRequest请求)处)在c:\ Project_Git \ Sitecore \ src \中的MyLibrary.test.Infrastructure.NinjectServiceLocator.DoGetInstance(Type serviceType,String key)at c:\ Projects \ Ninject \ ninject \ src \ Ninject \ Syntax \ ResolutionExtensions.cs:line 164 test \ Infrastructure \ NinjectServiceLocator.cs:Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType,String key)上的c:\ Home \ Chris \ Projects \ CommonServiceLocator \ main \ Microsoft.Practices.ServiceLocation \ ServiceLocatorImplBase.cs中的第15行:行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](字符串键)位于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

Solr Indexes Microsoft.Practices.ServiceLocation.ActivationException: Activation error occured while trying to get instance of type ISolrOperations`1, key "sitecore_analytics_index" ---> 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. at Ninject.KernelBase.Resolve(IRequest request) in c:\Projects\Ninject\ninject\src\Ninject\KernelBase.cs:line 376 at Ninject.ResolutionExtensions.Get(IResolutionRoot root, Type service, String name, IParameter[] parameters) in c:\Projects\Ninject\ninject\src\Ninject\Syntax\ResolutionExtensions.cs:line 164 at MyLibrary.test.Infrastructure.NinjectServiceLocator.DoGetInstance(Type serviceType, String key) in C:\test_Git\Sitecore\src\test\Infrastructure\NinjectServiceLocator.cs:line 15 at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line 49 --- End of inner exception stack trace --- at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance(Type serviceType, String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line 53 at Microsoft.Practices.ServiceLocation.ServiceLocatorImplBase.GetInstance[TService](String key) in c:\Home\Chris\Projects\CommonServiceLocator\main\Microsoft.Practices.ServiceLocation\ServiceLocatorImplBase.cs:line 103 at Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize() at ASP._Page_sitecore_admin_solr_diagnostic_cshtml.Execute() in c:\test_Git\Sitecore\build\25Sep2019\Website\sitecore\admin\solr-diagnostic.cshtml:line 29

这篇关于Sitecore 8.2:Solr无法正常工作并给出错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆