【问题标题】:SOLR 9 - org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.XSLTResponseWriter'SOLR 9 - org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: 加载类 \'solr.XSLTResponseWriter\' 时出错
【发布时间】:2023-01-17 16:50:52
【问题描述】:

我正在尝试设置 SOLR 9 并不断收到错误消息:org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: Error loading class 'solr.XSLTResponseWriter'

我一直在阅读文档并发现:https://solr.apache.org/guide/solr/latest/configuration-guide/solr-modules.html 建议使用标志:

-Dsolr.modules=scripting

我试过用标志运行 solr:

C:\> solr start -p 8988 -Dsolr.modules=scripting

但仍然不断收到相同的错误。

我还需要做些什么来让它运行吗?

【问题讨论】:

  • 您是否检查过 Solr 日志在启动时是否为您提供有关尝试加载脚本模块的任何有用反馈?

标签: solr


【解决方案1】:

XSLTResponseWriter 的名称空间在 Solr 8 和 Solr 9 之间发生了变化。

这是 Solr 9 的配置:(注意类属性)

<queryResponseWriter name="xslt" class="solr.scripting.xslt.XSLTResponseWriter">
    <int name="xsltCacheLifetimeSeconds">5</int>
</queryResponseWriter>

而不是 Solr8 的

<queryResponseWriter name="xslt" class="solr.XSLTResponseWriter">
    <int name="xsltCacheLifetimeSeconds">5</int>
</queryResponseWriter>

我在这里找到了信息:

https://solr.apache.org/guide/solr/latest/query-guide/response-writers.html#xslt-response-writer

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2013-05-30
    • 2020-07-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-01-17
    • 1970-01-01
    相关资源
    最近更新 更多