I have been running Solr with Tomcat, and I recently wrote a Quartz program 
that starts and stops Tomcat, starts Solr indexing jobs, and does a few other 
things. When I start Tomcat programmatically in this way, Solr starts 
initializing, and when it hits the text_ws field type in schema.xml, it throws 
an exception saying that it can't find the SynonymFilter class. text_ws refers 
to solr.SynonymFilterFactory, which must need to find lucene.SynonymFilter, and 
I am guessing it is the first Lucene class encountered while initializing the 
schema that isn't in lucene-core.jar.

I thought it would be easy to fix this by looking through the solr config files 
for the location where it specifies where it looks for Lucene jar files, and 
check to make sure that both the lucene-core and lucene-analyzers jar files are 
there. I see where there is a line in the solrconfig.xml file that says 
<luceneMatchVersion>LUCENE_36</luceneMatchVersion>, but not one that says to 
look for the Lucene jar files in a particular directory. Are the Lucene jar 
files packaged in the solr.war file?

I also looked for directories that contain Lucene jar files within my Solr 
project, which is called tiudocumentsearch, and the one I found was in 
tomcat/work/Catalina/localhost/tiudocumentsearch/WEB-INF/lib, but the 
lucene-core and lucene-analyzers jar files are both there.

So the two things I am asking for help in figuring out are how to indicate to 
Solr where the lucene-analyzers.jar file is, so it can find the SynonymFilters 
class during initialization, and why this exception isn't thrown when I start 
Tomcat for this Solr project in a command prompt window, but it occurs when I 
start Tomcat from a Java application. I am using Solr and Lucene 3.6.
Thank you for any help or suggestions you can provide,
Mike

Reply via email to