|
|
-
solr analysis-extras configuration
N. Tucker 2012-04-06, 19:15
Hello, I'm running into an odd problem trying to use ICUTokenizer under a solr installation running under tomcat on ubuntu. It seems that all the appropriate JAR files are loaded:
INFO: Adding 'file:/usr/share/solr/lib/lucene-stempel-3.5.0.jar' to classloader INFO: Adding 'file:/usr/share/solr/lib/lucene-smartcn-3.5.0.jar' to classloader INFO: Adding 'file:/usr/share/solr/lib/icu4j-4_8_1_1.jar' to classloader INFO: Adding 'file:/usr/share/solr/lib/lucene-icu-3.5.0.jar' to classloader INFO: Adding 'file:/usr/share/solr/lib/apache-solr-analysis-extras-3.5.0.jar' to classloader ... but later: ... SEVERE: java.lang.NoClassDefFoundError: org/apache/lucene/analysis/icu/segmentation/ICUTokenizer
I'm not too clear on the correct way to add the contrib bits other than copying them into the 'lib' directory under solrhome. They are obviously found there (and I have verified that ICUTokenizer is in lucene-icu-3.5.0.jar), but there's still a problem loading the ICUTokenizer class. Any tips on troubleshooting this? Are there more depenencies that I'm unaware of?
-
Re: solr analysis-extras configuration
N. Tucker 2012-04-06, 23:41
Further info: I can make this work if I stay out of tomcat -- I download a fresh solr binary distro, copy those five JARs from 'dist' and 'contrib' into example/solr/lib/, copy my solrconfig.xml and schema.xml, and run 'java -jar start.jar', and it works fine. But trying to add those same JARs to my tomcat instance's solrhome/lib doesn't work. Any ideas how to troubleshoot? On Fri, Apr 6, 2012 at 12:15 PM, N. Tucker <[EMAIL PROTECTED]> wrote: > Hello, I'm running into an odd problem trying to use ICUTokenizer > under a solr installation running under tomcat on ubuntu. It seems > that all the appropriate JAR files are loaded: > > INFO: Adding 'file:/usr/share/solr/lib/lucene-stempel-3.5.0.jar' to classloader > INFO: Adding 'file:/usr/share/solr/lib/lucene-smartcn-3.5.0.jar' to classloader > INFO: Adding 'file:/usr/share/solr/lib/icu4j-4_8_1_1.jar' to classloader > INFO: Adding 'file:/usr/share/solr/lib/lucene-icu-3.5.0.jar' to classloader > INFO: Adding 'file:/usr/share/solr/lib/apache-solr-analysis-extras-3.5.0.jar' > to classloader > ... but later: ... > SEVERE: java.lang.NoClassDefFoundError: > org/apache/lucene/analysis/icu/segmentation/ICUTokenizer > > I'm not too clear on the correct way to add the contrib bits other > than copying them into the 'lib' directory under solrhome. They are > obviously found there (and I have verified that ICUTokenizer is in > lucene-icu-3.5.0.jar), but there's still a problem loading the > ICUTokenizer class. Any tips on troubleshooting this? Are there more > depenencies that I'm unaware of?
-
Re: solr analysis-extras configuration
Lance Norskog 2012-04-07, 03:01
Tomcat needs an explicit parameter somewhere to use UTF-8 text. It's on the wiki how to do this.
On Fri, Apr 6, 2012 at 4:41 PM, N. Tucker <[EMAIL PROTECTED]> wrote: > Further info: I can make this work if I stay out of tomcat -- I > download a fresh solr binary distro, copy those five JARs from 'dist' > and 'contrib' into example/solr/lib/, copy my solrconfig.xml and > schema.xml, and run 'java -jar start.jar', and it works fine. But > trying to add those same JARs to my tomcat instance's solrhome/lib > doesn't work. Any ideas how to troubleshoot? > > > On Fri, Apr 6, 2012 at 12:15 PM, N. Tucker > <[EMAIL PROTECTED]> wrote: >> Hello, I'm running into an odd problem trying to use ICUTokenizer >> under a solr installation running under tomcat on ubuntu. It seems >> that all the appropriate JAR files are loaded: >> >> INFO: Adding 'file:/usr/share/solr/lib/lucene-stempel-3.5.0.jar' to classloader >> INFO: Adding 'file:/usr/share/solr/lib/lucene-smartcn-3.5.0.jar' to classloader >> INFO: Adding 'file:/usr/share/solr/lib/icu4j-4_8_1_1.jar' to classloader >> INFO: Adding 'file:/usr/share/solr/lib/lucene-icu-3.5.0.jar' to classloader >> INFO: Adding 'file:/usr/share/solr/lib/apache-solr-analysis-extras-3.5.0.jar' >> to classloader >> ... but later: ... >> SEVERE: java.lang.NoClassDefFoundError: >> org/apache/lucene/analysis/icu/segmentation/ICUTokenizer >> >> I'm not too clear on the correct way to add the contrib bits other >> than copying them into the 'lib' directory under solrhome. They are >> obviously found there (and I have verified that ICUTokenizer is in >> lucene-icu-3.5.0.jar), but there's still a problem loading the >> ICUTokenizer class. Any tips on troubleshooting this? Are there more >> depenencies that I'm unaware of?
-- Lance Norskog [EMAIL PROTECTED]
-
Re: solr analysis-extras configuration
Chris Hostetter 2012-04-09, 20:36
: Further info: I can make this work if I stay out of tomcat -- I : download a fresh solr binary distro, copy those five JARs from 'dist' : and 'contrib' into example/solr/lib/, copy my solrconfig.xml and : schema.xml, and run 'java -jar start.jar', and it works fine. But : trying to add those same JARs to my tomcat instance's solrhome/lib : doesn't work. Any ideas how to troubleshoot?
is there anything else about how you have tomicat+solr configured that might be causing tomcat to load *any* solr or lucene jars directly, instead of letting the solr.war file load them from your solr home dir? did you change anything about tomcat's classpath? did you copy any jars anywhere other then your solrhome/lib dir?
these kinds of "classloader hell" errors can happen if a parent classloader has already loaded some class that depends on (or is depended on by) a another class loaded by the solr war. -Hoss
-
Re: solr analysis-extras configuration
N. Tucker 2012-04-10, 23:58
I'm still not exactly clear on why this is the case, but the problem turned out to be that the extra libs needed to be in my tomcat app's WEB-INF/lib directory, rather than ${solrhome]/lib. I don't really understand the distinction between the two, especially since Solr was reporting that it was loading the libs found in ${solrhome}/lib.
At any rate, problem solved.
On Mon, Apr 9, 2012 at 1:36 PM, Chris Hostetter <[EMAIL PROTECTED]> wrote: > > : Further info: I can make this work if I stay out of tomcat -- I > : download a fresh solr binary distro, copy those five JARs from 'dist' > : and 'contrib' into example/solr/lib/, copy my solrconfig.xml and > : schema.xml, and run 'java -jar start.jar', and it works fine. But > : trying to add those same JARs to my tomcat instance's solrhome/lib > : doesn't work. Any ideas how to troubleshoot? > > is there anything else about how you have tomicat+solr configured that > might be causing tomcat to load *any* solr or lucene jars directly, > instead of letting the solr.war file load them from your solr home dir? > did you change anything about tomcat's classpath? did you copy any jars > anywhere other then your solrhome/lib dir? > > these kinds of "classloader hell" errors can happen if a parent > classloader has already loaded some class that depends on (or is depended > on by) a another class loaded by the solr war. > > > -Hoss
|
|