RE: NoClassDefFoundError while indexing in Solr

2014-07-23 Thread Pablo Queixalos
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 
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  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.ClassNotFoundExcept

Clustering not working when using 'text' field as snippet.

2011-08-12 Thread Pablo Queixalos
Hi,

 

 

I am using solr-3.3.0 and carrot² clustering which works fine out of the box 
with the examples doc and default solr configuration (the 'features' Field is 
used as snippet).

 

I indexed my own documents using the embed ExtractingRequestHandler wich by 
default stores contents in the 'text' Field. When configuring clustering on 
'text' as snippet, carrot doesn't work fine and only shows 'Other topics' with 
all the documents within. It looks like carrot doesn't get the 'text' Field 
stored content.

 

 

If I store the documents content in the 'features' field and get back to the 
original configuration clustering works fine.

 

The only difference I see between 'text' and 'features' Fields in schema.xml is 
that some CopyFields are defined for 'text'.

 

 

I didn't debug solr.clustering.ClusteringComponent nor CarrotClusteringEngine 
yet, but am I misunderstanding something about the 'text' Field ? 

 

 

Thanks,

 

Pablo.



RE: Clustering not working when using 'text' field as snippet.

2011-08-12 Thread Pablo Queixalos
Thanks for your reply Staszek,


Of course, the field has to be stored. I forgot to mention that I already 
updated the schema for that. I also checked that data was effectiveley stored 
in that field. 

Anyway, I tried to reproduce it on a fresh Solr install and clustering works 
well. ;-)


Pablo.

-Message d'origine-
De : stac...@gmail.com [mailto:stac...@gmail.com] De la part de Stanislaw 
Osinski
Envoyé : vendredi 12 août 2011 11:00
À : solr-user@lucene.apache.org
Objet : Re: Clustering not working when using 'text' field as snippet.

Hi Pablo,

The reason clustering doesn't work with the "text" field is that the field is 
not stored:

 

For clustering to work, you'll need to keep your documents' titles and content 
in stored fields.

Staszek


On Fri, Aug 12, 2011 at 10:28, Pablo Queixalos  wrote:

> Hi,
>
>
>
>
>
> I am using solr-3.3.0 and carrot² clustering which works fine out of 
> the box with the examples doc and default solr configuration (the 'features'
> Field is used as snippet).
>
>
>
> I indexed my own documents using the embed ExtractingRequestHandler 
> wich by default stores contents in the 'text' Field. When configuring 
> clustering on 'text' as snippet, carrot doesn't work fine and only shows 
> 'Other topics'
> with all the documents within. It looks like carrot doesn't get the 'text'
> Field stored content.
>
>
>
>
>
> If I store the documents content in the 'features' field and get back 
> to the original configuration clustering works fine.
>
>
>
> The only difference I see between 'text' and 'features' Fields in 
> schema.xml is that some CopyFields are defined for 'text'.
>
>
>
>
>
> I didn't debug solr.clustering.ClusteringComponent nor 
> CarrotClusteringEngine yet, but am I misunderstanding something about 
> the 'text' Field ?
>
>
>
>
>
> Thanks,
>
>
>
> Pablo.
>
>