我正在使用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);
}
答案 0 :(得分:0)
我收到以下异常
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上的第15行(位于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](字符串键)位于Sitecore.ContentSearch.SolrProvider.SolrSearchIndex.Initialize的c:\ Home \ Chris \ Projects \ CommonServiceLocator \ main \ Microsoft.Practices.ServiceLocation \ ServiceLocatorImplBase.cs:line 103 ()在ASP._Page_sitecore_admin_solr_diagnostic_cshtml.Execute()中,位于c:\ test_Git \ Sitecore \ build \ 25Sep2019 \ Website \ sitecore \ admin \ solr-diagnostic.cshtml:line 29