Reputation: 225
I'm trying to test an index of PDF documents to my Apache Solr Core.
I found the following instruction: https://lucene.apache.org/solr/guide/8_0/uploading-data-with-solr-cell-using-apache-tika.html#configuring-the-extractingrequesthandler-in-solrconfig-xml
I added the neccessary libraries to my solrconfig.xml
:
<lib dir="${solr.install.dir:../../..}/contrib/extraction/lib" regex=".*\.jar" />
<lib dir="${solr.install.dir:../../..}/dist/" regex="solr-cell-\d.*\.jar" />
I also added the RequestHandler for indexing the PDF documents:
<requestHandler name="/update/extract"
startup="lazy"
class="solr.extraction.ExtractingRequestHandler" >
<lst name="defaults">
<str name="lowernames">true</str>
<str name="fmap.content">_text_</str>
</lst>
</requestHandler>
Afterwards, I restarted my Solr server and then tried to index a PDF document by using curl:
curl 'http://localhost:8983/solr/test/update/extract?literal.id=doc1&commit=true' -F "myfile=@C:\Workspace\solr\solr-8.6.0\docs\pdf\test.pdf"
I expected the document to be indexed, but instead I get an Error 500 java.lang.NoClassDefFoundError: org/eclipse/jetty/server/MultiParts
:
> <html> <head> <meta http-equiv="Content-Type"
> content="text/html;charset=utf-8"/> <title>Error 500
> java.lang.NoClassDefFoundError:
> org/eclipse/jetty/server/MultiParts</title> </head> <body><h2>HTTP
> ERROR 500 java.lang.NoClassDefFoundError:
> org/eclipse/jetty/server/MultiParts</h2> <table>
> <tr><th>URI:</th><td>/solr/test/update/extract</td></tr>
> <tr><th>STATUS:</th><td>500</td></tr>
> <tr><th>MESSAGE:</th><td>java.lang.NoClassDefFoundError:
> org/eclipse/jetty/server/MultiParts</td></tr>
> <tr><th>SERVLET:</th><td>default</td></tr> <tr><th>CAUSED
> BY:</th><td>java.lang.NoClassDefFoundError:
> org/eclipse/jetty/server/MultiParts</td></tr> </table> <h3>Caused
> by:</h3><pre>java.lang.NoClassDefFoundError:
> org/eclipse/jetty/server/MultiParts
> at org.apache.solr.servlet.SolrRequestParsers.cleanupMultipartFiles(SolrRequestParsers.java:624)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:443)
> at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:345)
> at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1596)
> at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:545)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)
> at org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:590)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:235)
> at org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:1610)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:233)
> at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1300)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:188)
> at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:485)
> at org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:1580)
> at org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:186)
> at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1215)
> at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
> at org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:221)
> at org.eclipse.jetty.server.handler.InetAccessHandler.handle(InetAccessHandler.java:177)
> at org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:146)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:322)
> at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127)
> at org.eclipse.jetty.server.Server.handle(Server.java:500)
> at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383)
> at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547)
> at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375)
> at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273)
> at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311)
> at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103)
> at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117)
> at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806)
> at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938)
> at java.lang.Thread.run(Unknown Source) </pre>
>
> </body> </html>
Has anyone an idea?
Thanks!
Upvotes: 3
Views: 875
Reputation: 11
It is an issue of Solr 8.6.0 and Solr 8.6.1. See https://issues.apache.org/jira/browse/SOLR-14768
Downgrading Solr to 8.5.1 should solve it until the issue is fixed in a new Solr release.
Upvotes: 1