You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by ronak kirit <ro...@gmail.com> on 2014/04/11 11:44:54 UTC

Class not found ICUFoldingFilter (SOLR-4852)

Hello,

I am facing the same issue discussed at SOLR-4852. I am getting below error:

Caused by: java.lang.NoClassDefFoundError: Could not initialize class
org.apache.lucene.analysis.icu.ICUFoldingFilter
at
org.apache.lucene.analysis.icu.ICUFoldingFilterFactory.create(ICUFoldingFilterFactory.java:50)
  at
org.apache.solr.analysis.TokenizerChain.createComponents(TokenizerChain.java:67)


I am using solr-4.3.1. As discussed at SOLR-4852, I had all the jars at
(SOLR_HOME)/lib and there is no reference to lib via any of solrconfig.xml
or schema.xml.

I have also tried with setting "sharedLib=foo", but that also didn't work.
However, if  I removed all the below files:

icu4j-49.1.jar

lucene-analyzers-morfologik-4.3.1.jar  l

ucene-analyzers-stempel-4.3.1.jar

solr-analysis-extras-4.3.1.jar

lucene-analyzers-icu-4.3.1.jar

lucene-analyzers-smartcn-4.3.1.jar

lucene-analyzers-uima-4.3.1.jar

from $(solrhome)/lib and move to solr-webapp/webapp/WEB-INF/lib things are
working fine.

Any guess? Any help?

Thanks,

Ronak

Re: Class not found ICUFoldingFilter (SOLR-4852)

Posted by ronak kirit <ro...@gmail.com>.
Hello Shawn,

Thanks for your reply.

Yes, I have defined ${solr.solr.home} explicitly, and all the mentioned
jars present in ${solr.solr.home}/lib. solr.log also shows that those files
are getting added once (grep "icu4" solr.log). I could see the lines in
log,

INFO  - 2014-04-15 15:40:21.448; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/icu4j-49.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.454; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-icu-4.3.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.454; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-morfologik-4.3.1.jar' to
classloader
INFO  - 2014-04-15 15:40:21.455; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-smartcn-4.3.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.455; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-stempel-4.3.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.455; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-uima-4.3.1.jar' to classloader

But, still, I get the same exception ICUFoldingFilter not found. However,
coping those files to WEB-INF/lib, works fine for me.

Thanks,
Ronak


On Fri, Apr 11, 2014 at 3:14 PM, ronak kirit <ro...@gmail.com> wrote:

> Hello,
>
> I am facing the same issue discussed at SOLR-4852. I am getting below
> error:
>
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.lucene.analysis.icu.ICUFoldingFilter
> at
> org.apache.lucene.analysis.icu.ICUFoldingFilterFactory.create(ICUFoldingFilterFactory.java:50)
>   at
> org.apache.solr.analysis.TokenizerChain.createComponents(TokenizerChain.java:67)
>
>
> I am using solr-4.3.1. As discussed at SOLR-4852, I had all the jars at
> (SOLR_HOME)/lib and there is no reference to lib via any of solrconfig.xml
> or schema.xml.
>
> I have also tried with setting "sharedLib=foo", but that also didn't work.
> However, if  I removed all the below files:
>
> icu4j-49.1.jar
>
> lucene-analyzers-morfologik-4.3.1.jar  l
>
> ucene-analyzers-stempel-4.3.1.jar
>
> solr-analysis-extras-4.3.1.jar
>
> lucene-analyzers-icu-4.3.1.jar
>
> lucene-analyzers-smartcn-4.3.1.jar
>
> lucene-analyzers-uima-4.3.1.jar
>
> from $(solrhome)/lib and move to solr-webapp/webapp/WEB-INF/lib things are
> working fine.
>
> Any guess? Any help?
>
> Thanks,
>
> Ronak
>

Re: Class not found ICUFoldingFilter (SOLR-4852)

Posted by Ronak Kirit <ro...@gmail.com>.
Hello Shawn,

Thanks for your reply.

Yes, I have defined ${solr.solr.home} explicitly, and all the mentioned jars
present in ${solr.solr.home}/lib. solr.log also shows that those files are
getting added once (grep "icu4" solr.log). I could see the lines in log,

INFO  - 2014-04-15 15:40:21.448; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/icu4j-49.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.454; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-icu-4.3.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.454; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-morfologik-4.3.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.455; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-smartcn-4.3.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.455; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-stempel-4.3.1.jar' to classloader
INFO  - 2014-04-15 15:40:21.455; org.apache.solr.core.SolrResourceLoader;
Adding 'file:/solr/lib/lucene-analyzers-uima-4.3.1.jar' to classloader

But, still, I get the same exception ICUFoldingFilter not found. However,
coping those files to WEB-INF/lib, works fine for me. 



--
View this message in context: http://lucene.472066.n3.nabble.com/Class-not-found-ICUFoldingFilter-SOLR-4852-tp4130612p4131221.html
Sent from the Solr - User mailing list archive at Nabble.com.

Re: Class not found ICUFoldingFilter (SOLR-4852)

Posted by Shawn Heisey <so...@elyograg.org>.
On 4/11/2014 3:44 AM, ronak kirit wrote:
> I am facing the same issue discussed at SOLR-4852. I am getting below error:
> 
> Caused by: java.lang.NoClassDefFoundError: Could not initialize class
> org.apache.lucene.analysis.icu.ICUFoldingFilter
> at
> org.apache.lucene.analysis.icu.ICUFoldingFilterFactory.create(ICUFoldingFilterFactory.java:50)
>   at
> org.apache.solr.analysis.TokenizerChain.createComponents(TokenizerChain.java:67)
> 
> 
> I am using solr-4.3.1. As discussed at SOLR-4852, I had all the jars at
> (SOLR_HOME)/lib and there is no reference to lib via any of solrconfig.xml
> or schema.xml.

I filed SOLR-4852.  Resource loading seems to be a black art with Solr!

The only jars you need for the ICU analysis components are
lucene-analyzers-icu-4.3.1.jar and icu4j-49.1.jar, possibly with
different version numbers in the names.

Are you defining solr.solr.home explicitly?  I'm just wondering if maybe
${solr.solr.home}/lib isn't where you think it is, or whether maybe
there's another copy of the jars somewhere on the classpath.  The log
should show which jars are loaded ... do you see either of the above
jars loaded more than once?  If you do, that seems to be the trigger for
the problem.  All but one copy needs to be removed.

If the jars exist in the extracted WAR (the WEB-INF location you
mentioned), everything seems to work, but the problem with this is that
when you replace the .war file, your changes to the extracted war will
either be outdated or possibly will get removed.  It is good practice to
entirely remove the extracted .war contents when upgrading Solr.

Thanks,
Shawn