Sitecore 8.2 更新 5 Ninject Solr 支持包问题

Sitecore 8.2 update 5 Ninject Solr support package issue

我遇到了 Ninject IOC 容器的问题。

我正在使用 Sitecore 8.2 update 5 并使用 https://sitecorerockz.wordpress.com/2018/08/01/lucene-to-solr/

中提到的步骤从 Lucene 切换到 Solr 搜索引擎

我正在使用 Solr 6.6.3。早些时候这个项目是在 Sitecore 6.X 版本上,不时发生一些升级,现在它在 Sitecore 8.2 update 5 中。 相同的 Solr 设置适用于新的 Sitecore 8.2 update 5 设置。

我创建了 Solr 诊断页面并将其保存在 /Sitecore/admin 文件夹中以检查错误详细信息,我收到所有索引的以下错误:

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\buildSep2019\Website\sitecore\admin\solr-diagnostic.cshtml:line 29

我错过了什么,你能告诉我吗?

SetLocatorProvider 被初始化了两次

  • 修改了与Ninject IOC
  • 相关的自定义代码
  • 我们目前的解决方案是使用 Ninject.dll 3.0.0.0,现在我使用了新版本的 Ninject.dll,即文件夹 bin>>Social
  • 下的 3.2.2.0
  • 替换了新的 Sitecore 8.2 更新 5 文件中的所有 Solr dll 文件