BTW, Ameya, jhighlight-1.0.jar is in the Solr binary distribution, in contrib/extraction/lib. There are a bunch of different libraries that Tika uses for content extraction, so this seems like a good time to make sure that Tika has all the jars available that it might need to process the files you're indexing. Everything relevant should be included in contrib/extraction/lib.
Steve On Wed, Jul 23, 2014 at 01:53:45PM +0000, Pablo Queixalos wrote: > There is a source code "parser" in tika that in fact just renders the source > using an external source higlighter. > > Seen in you stack trace : > com.apache.tika.parser.code.SourceCodeParser.getRenderer(SourceCodeParser.java:121) > > You are indexing code (java, c or groovy). Solr seems to be missing a > transitive tika dependency (http://freecode.com/projects/jhighlight). > > Copying the lib in solr runtime lib directory should solve your issue. > > > Pablo. > ________________________________________ > From: Shalin Shekhar Mangar <shalinman...@gmail.com> > Sent: Wednesday, July 23, 2014 7:43 AM > To: solr-user@lucene.apache.org > Subject: Re: NoClassDefFoundError while indexing in Solr > > Solr is trying to load "com/uwyn/jhighlight/renderer/XhtmlRendererFactory" > but that is not a class which is shipped or used by Solr. I think you have > some custom plugins (a highlighter perhaps?) which uses that class and the > classpath is not setup correctly. > > > On Wed, Jul 23, 2014 at 2:20 AM, Ameya Aware <ameya.aw...@gmail.com> wrote: > > > Hi > > > > I am running into below error while indexing a file in solr. > > > > Can you please help to fix this? > > > > ERROR - 2014-07-22 16:40:32.126; org.apache.solr.common.SolrException; > > null:java.lang.RuntimeException: java.lang.NoClassDefFoundError: > > com/uwyn/jhighlight/renderer/XhtmlRendererFactory > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.sendError(SolrDispatchFilter.java:790) > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:439) > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207) > > at > > > > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) > > at > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) > > at > > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) > > at > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) > > at > > > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) > > at > > > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) > > at > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) > > at > > > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) > > at > > > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) > > at > > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) > > at > > > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) > > at > > > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) > > at > > > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) > > at org.eclipse.jetty.server.Server.handle(Server.java:368) > > at > > > > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) > > at > > > > org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) > > at > > > > org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) > > at > > > > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) > > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:636) > > at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) > > at > > > > org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) > > at > > > > org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) > > at > > > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) > > at > > > > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) > > at java.lang.Thread.run(Unknown Source) > > Caused by: java.lang.NoClassDefFoundError: > > com/uwyn/jhighlight/renderer/XhtmlRendererFactory > > at > > > > org.apache.tika.parser.code.SourceCodeParser.getRenderer(SourceCodeParser.java:121) > > at > > > > org.apache.tika.parser.code.SourceCodeParser.parse(SourceCodeParser.java:102) > > at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242) > > at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242) > > at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120) > > at > > > > org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:219) > > at > > > > org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74) > > at > > > > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > > at > > > > org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:241) > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774) > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418) > > ... 26 more > > Caused by: java.lang.ClassNotFoundException: > > com.uwyn.jhighlight.renderer.XhtmlRendererFactory > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > at java.net.FactoryURLClassLoader.loadClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > ... 38 more > > > > WARN - 2014-07-22 16:40:32.193; org.eclipse.jetty.servlet.ServletHandler; > > Error for /solr/collection1/update/extract > > java.lang.NoClassDefFoundError: > > com/uwyn/jhighlight/renderer/XhtmlRendererFactory > > at > > > > org.apache.tika.parser.code.SourceCodeParser.getRenderer(SourceCodeParser.java:121) > > at > > > > org.apache.tika.parser.code.SourceCodeParser.parse(SourceCodeParser.java:102) > > at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242) > > at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242) > > at org.apache.tika.parser.AutoDetectParser.parse(AutoDetectParser.java:120) > > at > > > > org.apache.solr.handler.extraction.ExtractingDocumentLoader.load(ExtractingDocumentLoader.java:219) > > at > > > > org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:74) > > at > > > > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135) > > at > > > > org.apache.solr.core.RequestHandlers$LazyRequestHandlerWrapper.handleRequest(RequestHandlers.java:241) > > at org.apache.solr.core.SolrCore.execute(SolrCore.java:1952) > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:774) > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:418) > > at > > > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:207) > > at > > > > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419) > > at > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455) > > at > > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137) > > at > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557) > > at > > > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231) > > at > > > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075) > > at > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384) > > at > > > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193) > > at > > > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009) > > at > > > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135) > > at > > > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255) > > at > > > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:154) > > at > > > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:116) > > at org.eclipse.jetty.server.Server.handle(Server.java:368) > > at > > > > org.eclipse.jetty.server.AbstractHttpConnection.handleRequest(AbstractHttpConnection.java:489) > > at > > > > org.eclipse.jetty.server.BlockingHttpConnection.handleRequest(BlockingHttpConnection.java:53) > > at > > > > org.eclipse.jetty.server.AbstractHttpConnection.headerComplete(AbstractHttpConnection.java:942) > > at > > > > org.eclipse.jetty.server.AbstractHttpConnection$RequestHandler.headerComplete(AbstractHttpConnection.java:1004) > > at org.eclipse.jetty.http.HttpParser.parseNext(HttpParser.java:636) > > at org.eclipse.jetty.http.HttpParser.parseAvailable(HttpParser.java:235) > > at > > > > org.eclipse.jetty.server.BlockingHttpConnection.handle(BlockingHttpConnection.java:72) > > at > > > > org.eclipse.jetty.server.bio.SocketConnector$ConnectorEndPoint.run(SocketConnector.java:264) > > at > > > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:608) > > at > > > > org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:543) > > at java.lang.Thread.run(Unknown Source) > > Caused by: java.lang.ClassNotFoundException: > > com.uwyn.jhighlight.renderer.XhtmlRendererFactory > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.net.URLClassLoader$1.run(Unknown Source) > > at java.security.AccessController.doPrivileged(Native Method) > > at java.net.URLClassLoader.findClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > at java.net.FactoryURLClassLoader.loadClass(Unknown Source) > > at java.lang.ClassLoader.loadClass(Unknown Source) > > ... 38 more > > > > > > > > Thanks, > > Ameya > > > > > > -- > Regards, > Shalin Shekhar Mangar.