Caused by: java.lang.ClassNotFoundException: solr.extraction.ExtractingRequestHandler

2022-03-28 14:39:37 浏览数 (1)

将solr6部署到tomcat并启动后使用post工具将一些文档添加到solr服务器出现以下提示:

代码语言:javascript复制
Caused by: java.lang.ClassNotFoundException: solr.extraction.ExtractingRequestHandler

提示没有找到ExtractingRequestHandler,到底是什么原因导致这个问题呢,下面讲解以下如何解类似的问题,这个可以通过查看solr服务器的logging模块给出的提示解决:

需要注意的是下面这句:

SolrConfig Couldn't add files from D:apache-tomcat-8.5.12webappssolrsolr_homebook......contribextractionlib filtered by .*.jar to classpath: D:apache-tomcat-8.5.12webappssolrsolr_homebook......contribextractionlib 这说明solrconfig.xml中配置的solr 插件位置不对,具体配置为:

代码语言:javascript复制
  <lib dir="../../../contrib/extraction/lib" regex=".*.jar" />
  <lib dir="../../../dist/" regex="solr-cell-d.*.jar" />

  <lib dir="../../contrib/clustering/lib/" regex=".*.jar" />
  <lib dir="../../dist/" regex="solr-clustering-d.*.jar" />

  <lib dir="../../contrib/langid/lib/" regex=".*.jar" />
  <lib dir="../../dist/" regex="solr-langid-d.*.jar" />

  <lib dir="../../contrib/velocity/lib" regex=".*.jar" />
  <lib dir="../../dist/" regex="solr-velocity-d.*.jar" />

具体目录为contrib/extraction/lib之类插件目录相对于solr core实例目录的相对位置!

0 人点赞