Hi,

I tried to start the solr-4.0.0-BETA with tomcat-6.0.20 but does not work.
I copied the apache-solr-4.0.0-BETA.war to $TOMCAT_HOME/webapps. Then I copied 
the directory apache-solr-4.0.0-BETA\example\solr to C:\home\solr-4.0-beta and 
adjusted the file 
$TOMCAT_HOME\conf\Catalina\localhost\apache-solr-4.0.0-BETA.xml to point the 
solr/home to C:/home/solr-4.0-beta. With this configuration, when I startup 
tomcat I got:

SEVERE: org.apache.solr.common.SolrException: Invalid luceneMatchVersion 
'LUCENE_40', valid values ​​are: [LUCENE_20, LUCENE_21, LUCENE_22, LUCENE_23, 
LUCENE_24, LUCENE_29, LUCENE_30, LUCENE_31, LUCENE_32, LUCENE_33, LUCENE_34, 
LUCENE_35, LUCENE_36, LUCENE_CURRENT ] or a string in format 'VV'

So I changed the line in solrconfig.xml:

<luceneMatchVersion>LUCENE_40</luceneMatchVersion>

to

<luceneMatchVersion>LUCENE_CURRENT</luceneMatchVersion>

So I got a new error:

Caused by: java.lang.ClassNotFoundException: solr.NRTCachingDirectoryFactory

This class is within the file apache-solr-core-4.0.0-BETA.jar but for some 
reason classloader of the class is not loaded. I then moved all jars in 
$TOMCAT_HOME\webapps\apache-solr-4.0.0-BETA\WEB-INF\lib to $TOMCAT_HOME\lib.
After this setup, I got a new error:

SEVERE: java.lang.ClassCastException: 
org.apache.solr.core.NRTCachingDirectoryFactory can not be cast to 
org.apache.solr.core.DirectoryFactory

So I changed the line in solrconfig.xml:

<directoryFactory name="DirectoryFactory"
                    
class="${solr.directoryFactory:solr.NRTCachingDirectoryFactory}"/>

to

<directoryFactory name="DirectoryFactory"
                    
class="${solr.directoryFactory:solr.NIOFSDirectoryFactory}"/>

So I got a new error:

Caused by: java.lang.ClassCastException: 
org.apache.solr.spelling.DirectSolrSpellChecker can not be cast to 
org.apache.solr.spelling.SolrSpellChecker

How can I resolve the problem of classloader?
How can I resolve the problem of cast of NRTCachingDirectoryFactory and 
DirectSolrSpellChecker?
I can not startup the solr 4.0 beta with tomcat.
Thanks,




Reply via email to