I am having fits getting the Search API /SOLR/TIKA to work with attachments.

Here is an error from the watch dog:

SearchApiException: "500" Status: Server Error: Server Error{"error":{"msg":"java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException","trace":"java.lang.RuntimeException: java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException\n\tat org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:670)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:380)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)\n\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)\n\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:453)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\n\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:560)\n\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1072)\n\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:382)\n\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\n\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1006)\n\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\n\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\n\tat org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154)\n\tat org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116)\n\tat org.eclipse.jetty.server.Server.handle(Server.java:365)\n\tat org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:485)\n\tat org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53)\n\tat org.eclipse.jetty.server.AbstractHttpConnection.content(AbstractHttpConnection.java:937)\n\tat org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.content(AbstractHttpConnection.java:998)\n\tat org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:856)\n\tat org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:240)\n\tat org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72)\n\tat org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608)\n\tat org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543)\n\tat java.lang.Thread.run(Thread.java:744)\nCaused by: java.lang.NoClassDefFoundError: org/apache/tika/mime/MimeTypeException\n\tat java.lang.Class.forName0(Native Method)\n\tat java.lang.Class.forName(Class.java:270)\n\tat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:458)\n\tat org.apache.solr.core.SolrResourceLoader.findClass(SolrResourceLoader.java:396)\n\tat org.apache.solr.core.SolrCore.createInstance(SolrCore.java:518)\n\tat org.apache.solr.core.SolrCore.createRequestHandler(SolrCore.java:592)\n\tat org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.getWrappedHandler(RequestHandlers.java:249)\n\tat org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:240)\n\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:1816)\n\tat org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:656)\n\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:359)\n\t... 26 more\nCaused by: java.lang.ClassNotFoundException: org.apache.tika.mime.MimeTypeException\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:366)\n\tat java.net.URLClassLoader$1.run(URLClassLoader.java:355)\n\tat java.security.AccessController.doPrivileged(Native Method)\n\tat java.net.URLClassLoader.findClass(URLClassLoader.java:354)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:425)\n\tat java.net.FactoryURLClassLoader.loadClass(URLClassLoader.java:789)\n\tat java.lang.ClassLoader.loadClass(ClassLoader.java:358)\n\t... 37 more\n","code":500}} in SearchApiSolrConnection->checkResponse() (line 536 of /ssd/www/drupal/sites/all/modules/search_api_solr/includes/solr_connection.inc).

Comments

pmol123’s picture

Issue summary: View changes
pmol123’s picture

Issue summary: View changes
pmol123’s picture

Issue summary: View changes
izus’s picture

Status: Active » Closed (cannot reproduce)

seems like tika/solr is not working/up.
the end of the error you get is : in SearchApiSolrConnection->checkResponse() (line 536 of /ssd/www/drupal/sites/all/modules/search_api_solr/includes/solr_connection.inc).
i guess solr is not responding
please feel free to reopen if you still have the error even if search_api_solr works well for you

pmol123’s picture

Priority: Major » Normal
Status: Closed (cannot reproduce) » Closed (fixed)

Argh!

To debug, I tried to run TIKA from the command line with the --gui option. It complained.

When I downloaded the TIKA JAR file, I grabbed the link with a ctrl-click, then did a wget from the server with that link.

Apparently there was an intermediate page and the WGET actually grabbed the HTIL of that page BUT ironically named it properly (tika-1.5.jar), hence I went on my merry way thinking it was downloaded.

I now have the proper JAR file installed and all seems to be working.

Thank you.