Hybris Solr无法加载核心
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Hybris Solr无法加载核心相关的知识,希望对你有一定的参考价值。
我是hybris的新手并试图加载我的服装店数据。每当我执行一个ant初始化时,我都会收到以下错误:
org.apache.solr.common.SolrException: Could not load conf for core mProduct: Plugin init failure for [schema.xml] fieldType "string": Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'. Schema file is E:hybrisconfigsolrinstancesdefaultconfigsetsdefaultconfschema.xml
at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:80)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:725)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:701)
at org.apache.solr.handler.admin.CoreAdminHandler.handleCreateAction(CoreAdminHandler.java:629)
at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestInternal(CoreAdminHandler.java:214)
at org.apache.solr.handler.admin.CoreAdminHandler.handleRequestBody(CoreAdminHandler.java:194)
at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143)
at org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:675)
at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:443)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:210)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:179)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1652)
at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:585)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:577)
at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:223)
at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:515)
at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)
at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1061)
at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:215)
at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:110)
at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
at org.eclipse.jetty.server.Server.handle(Server.java:499)
at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:310)
at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:257)
at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:540)
at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)
at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)
at java.lang.Thread.run(Unknown Source)
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "string": Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'. Schema file is E:hybrisconfigsolrinstancesdefaultconfigsetsdefaultconfschema.xml
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:596)
at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:175)
at org.apache.solr.schema.IndexSchemaFactory.create(IndexSchemaFactory.java:55)
at org.apache.solr.schema.IndexSchemaFactory.buildIndexSchema(IndexSchemaFactory.java:69)
at org.apache.solr.core.ConfigSetService.createIndexSchema(ConfigSetService.java:104)
at org.apache.solr.core.ConfigSetService.getConfig(ConfigSetService.java:75)
... 30 more
Caused by: org.apache.solr.common.SolrException: Plugin init failure for [schema.xml] fieldType "string": Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:178)
at org.apache.solr.schema.IndexSchema.readSchema(IndexSchema.java:489)
... 35 more
Caused by: org.apache.solr.common.SolrException: Error loading class 'de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory'
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:491)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:560)
at org.apache.solr.core.SolrResourceLoader.newInstance(SolrResourceLoader.java:525)
at org.apache.solr.schema.IndexSchema.readSimilarity(IndexSchema.java:977)
at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:109)
at org.apache.solr.schema.FieldTypePluginLoader.create(FieldTypePluginLoader.java:52)
at org.apache.solr.util.plugin.AbstractPluginLoader.load(AbstractPluginLoader.java:152)
... 36 more
Caused by: java.lang.ClassNotFoundException: de.hybris.platform.solrfacetsearch.ysolr.similarity.FixedTFIDFSimilarityFactory
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.net.FactoryURLClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:475)
... 42 more
这就是我的localextensions.xml的样子:
<hybrisconfig xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="resources/schemas/extensions.xsd">
<extensions>
<path dir="${HYBRIS_BIN_DIR}" />
<path dir="${HYBRIS_BIN_DIR}/custom" />
<!-- ext-platform -->
<extension name="admincockpit" />
<extension name="backoffice" />
<extension name="cockpit" />
<extension name="hmc" />
<extension name="mcc" />
<extension name="platformhmc" />
<extension name="amazoncloud" />
<!-- ext-commerce -->
<extension name="btg" />
<extension name="btgcockpit" />
<extension name="commercesearch" />
<extension name="commercesearchbackoffice" />
<extension name="commercesearchhmc" />
<extension name="commerceservices" />
<extension name="basecommerce" />
<extension name="payment" />
<extension name="promotions" />
<extension name="voucher" />
<extension name="customerreview" />
<extension name="ticketsystem" />
<extension name="solrfacetsearch" />
<extension name="solrfacetsearchhmc" />
<extension name="wishlist" />
<extension name="commercefacades" />
<!-- ext-data -->
<extension name="commercesearchsampledata" />
<extension name="mediaconversion" />
<!-- ext-content -->
<extension name="productcockpit" />
<extension name="cms2" />
<extension name="cms2lib" />
<extension name="cmscockpit" />
<extension name="mobileoptionals" />
<extension name="mobileservices" />
<extension name="cscockpit" />
<extension name="instore" />
<!-- ext-addon -->
<extension name="addonsupport" />
<!-- ext-accelerator -->
<extension name="acceleratorservices" />
<extension name="acceleratorfacades" />
<extension name="acceleratorcms" />
<extension name="acceleratorstorefrontcommons" />
<!-- Solr server extension -->
<extension name="solrserver"/>
<!-- Lucene-search extension for backoffice -->
<extension name="lucenesearch"/>
<extension name='warehousingbackoffice' />
<extension name='paymentgatewaymockaddon' />
<!-- Adding extensions for backoffice -->
<!-- add them at the end of every backoffice extension -->
<extension name="platformbackoffice"/>
<extension name="mediaconversionbackoffice"/>
<!-- unbxd integration -->
<extension name="unbxd"/>
</extensions>
</hybrisconfig>
无论如何我可以解决这个问题吗?
答案
看起来加载核心时找不到包含FixedTFIDFSimilarityFactory的jar文件。它应该在lib目录中或在solrconfig.xml中引用。也许库放置的位置与Solr / core的位置不同。
另一答案
@Alexandre提到的jar库是hybriscomponents.5.5.1.0.jar
(或者更新的:solr-hybris-components-7.4.3.jar
)。类FixedTFIDFSimilarityFactory
的包已经随着JAR文件的版本而改变。
您需要做的就是更改所有引用:qazxsw poi 成: qazxsw poi 在你所有的qazxsw poi文件里面。
以上是关于Hybris Solr无法加载核心的主要内容,如果未能解决你的问题,请参考以下文章
#私藏项目实操分享# SAP Commerce Cloud 里的 Solr 架构简介
solr分布式索引实战分片配置读取:工具类configUtil.java,读取配置代码片段,配置实例
HTTP 错误 500(Internal Server Error):服务器尝试执行请求时遇到了意外情况.