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