1
votes

I want to deploy solr.war in Tomcat5.5. I have copied solr.war file in webapps and extract it. while running http://localhost:8080/solr/ i am facing wid following exception. please suggest me what i need to do.

Could not start SOLR. Check solr/home property java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in classpath or 'solr/conf/', cwd=C:\Program Files\Apache Software Foundation\Tomcat 5.5\bin"

it is saying to include solrconfig.xml in classpath but i m not finding any .classpath file.

1
classpath is not a file. In Java Runtime Environment, it uses CLASSPATH variable defined in OS environment. In window, CLASSPATH=%CLASSPTH%;yourpath .In Unix-like, CLASSPATH=$CLASSPATH:yourpathXuvi
@Xuvi: Then could you please tell me how to add solrconfig.xml in classpathRomi
Actually I don't know about SOLR. But I think this LINK could be helpful wiki.apache.org/solr/SolrTomcat. Take consideration to this <Context docBase="/opt/solr/example/apache-solr-1.3.0.war" debug="0" crossContext="true"> <Environment name="solr/home" type="java.lang.String" value="/opt/solr/example" override="true"/> </Context>Xuvi
Xuvi : i did what dis link wiki.apache.org/solr/SolrTomcat is saying. but still getting the same exception.Romi
Did you set your Solr home directory in your Tomcat startup script? This is how you do it: export JAVA_OPTS="$JAVA_OPTS -Dsolr.solr.home=/opt/solr/example". Check the full instructions on how to set up a single Solr application.Benjamin Muschko

1 Answers

3
votes

Create a file solr.xml in cofig/catalina/localhost folder . Add this Context

<Context docBase="D:\project\Solr_Integration\apache-tomcat-6.0.35\webapps\solr.war" debug="0" crossContext="true" >
    <Environment name="solr/home" type="java.lang.String" value="D:\project\Solr_Integration\solr" override="true" />
</Context>

copy files manaully form here D:\project\Solr_Integration\apache-solr-4.0.0\example\solr in the following path D:\project\Solr_Integration\solr

Start the server .