Solr 没有类定义错误(分析模块库?

Solr No class definition Error (analysis Module libraries?)

提问人:emajar 提问时间:11/3/2023 最后编辑:Kirweenemajar 更新时间:11/6/2023 访问量:36

问:

我已将 solr 核心实例从 8.11.2 版升级到 9.4 版;当我使用 Prevuious 自定义浏览请求处理程序时,页面会显示以下错误:

HTTP ERROR 500 java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/ResourceLoader
URI:    /solr/core/browse
STATUS: 500
MESSAGE:    java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/ResourceLoader
SERVLET:    default
CAUSED BY:  java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/ResourceLoader
CAUSED BY:  java.lang.ClassNotFoundException: org.apache.lucene.analysis.util.ResourceLoader
Caused by:
java.lang.NoClassDefFoundError: org/apache/lucene/analysis/util/ResourceLoader
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Unknown Source)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:544)
    at org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:471)
    at org.apache.solr.core.SolrCore.createInstance(SolrCore.java:938)
    at org.apache.solr.core.PluginBag$LazyPluginHolder.createInst(PluginBag.java:520)
    at org.apache.solr.core.PluginBag$LazyPluginHolder.get(PluginBag.java:502)
    at org.apache.solr.core.PluginBag.get(PluginBag.java:198)
    at org.apache.solr.core.PluginBag.get(PluginBag.java:208)
    at org.apache.solr.core.SolrCore.getQueryResponseWriter(SolrCore.java:3113)
    at org.apache.solr.servlet.HttpSolrCall.getResponseWriter(HttpSolrCall.java:923)
    at org.apache.solr.servlet.HttpSolrCall.sendError(HttpSolrCall.java:837)
    at org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:596)
    at org.apache.solr.servlet.SolrDispatchFilter.dispatch(SolrDispatchFilter.java:262)
    at org.apache.solr.servlet.SolrDispatchFilter.lambda$doFilter$0(SolrDispatchFilter.java:219)
    at org.apache.solr.servlet.ServletUtils.traceHttpRequestExecution2(ServletUtils.java:246)
    at org.apache.solr.servlet.ServletUtils.rateLimitRequest(ServletUtils.java:215)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:213)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:195)
    at org.eclipse.jetty.servlet.FilterHolder.doFilter(FilterHolder.java:210)
    at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1635)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:527)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:131)
    at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:598)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:223)
    at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1570)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:221)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1384)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:176)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:484)
    at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1543)
    at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:174)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1306)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:129)
    at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
    at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:228)
    at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
    at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:301)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
    at org.eclipse.jetty.server.handler.gzip.GzipHandler.handle(GzipHandler.java:822)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:122)
    at org.eclipse.jetty.server.Server.handle(Server.java:563)
    at org.eclipse.jetty.server.HttpChannel$RequestDispatchable.dispatch(HttpChannel.java:1598)
    at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:753)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:501)
    at org.eclipse.jetty.server.HttpChannel.run(HttpChannel.java:461)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.produce(AdaptiveExecutionStrategy.java:193)
    at org.eclipse.jetty.http2.HTTP2Connection.produce(HTTP2Connection.java:208)
    at org.eclipse.jetty.http2.HTTP2Connection.onFillable(HTTP2Connection.java:155)
    at org.eclipse.jetty.http2.HTTP2Connection$FillableCallback.succeeded(HTTP2Connection.java:450)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
    at org.eclipse.jetty.io.ssl.SslConnection$DecryptedEndPoint.onFillable(SslConnection.java:558)
    at org.eclipse.jetty.io.ssl.SslConnection.onFillable(SslConnection.java:379)
    at org.eclipse.jetty.io.ssl.SslConnection$2.succeeded(SslConnection.java:146)
    at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:100)
    at org.eclipse.jetty.io.SelectableChannelEndPoint$1.run(SelectableChannelEndPoint.java:53)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.runTask(AdaptiveExecutionStrategy.java:421)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.consumeTask(AdaptiveExecutionStrategy.java:390)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.tryProduce(AdaptiveExecutionStrategy.java:277)
    at org.eclipse.jetty.util.thread.strategy.AdaptiveExecutionStrategy.run(AdaptiveExecutionStrategy.java:199)
    at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:411)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:969)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.doRunJob(QueuedThreadPool.java:1194)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:1149)
    at java.base/java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: org.apache.lucene.analysis.util.ResourceLoader
    at java.base/java.net.URLClassLoader.findClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    at java.base/java.net.FactoryURLClassLoader.loadClass(Unknown Source)
    at java.base/java.lang.ClassLoader.loadClass(Unknown Source)
    ... 70 more

我读到我可能缺少一些 lucene 库,或者该类未正确定义: 我的SolrConfig库定义如下所示:

\<lib dir="${solr.install.dir:../../../..}/modules/extraction/lib" regex=".\*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/clustering/lib/" regex=".\*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/langid/lib/" regex=".\*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/ltr/lib/" regex=".\*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/scripting/lib/" regex=".\*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/velocity/lib" regex=".*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" regex=".*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lucene-libs" regex=".\*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/analysis-extras/lib" regex="".\*.jar" /\>

\<lib dir="${solr.install.dir:../../../..}/modules/analytics/lib" regex=".\*.jar" /\>

我错过了什么,solr 9.4 中关于这些库的一些变化吗?

Solr 共享库 velocity solrcloud

评论


答: 暂无答案