Hi there,

I've been following the instruction from http://wiki.apache.org/solr/SolrJetty?highlight=%28Multiple%29%7C%28Solr%29%7C%28Webapps%29solr to get a few indexes running under the same instance of jetty 6.1.2. If I use the webapp descriptors as specified in the wiki (with correct paths, I'm just pasting the example here)..

<Call name="addWebApplication">
 <Arg>/*solr*1/*</Arg>
 <Arg>/your/path/to/the/*solr*.war</Arg>
 <Set name="extractWAR">true</Set>
<Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>
 <Call name="addEnvEntry">
   <Arg>*solr*/home</Arg>
   <Arg type="String">/your/path/to/your/*solr*/home/dir</Arg>
 </Call>
</Call>

<Call name="addWebApplication">
 <Arg>/*solr*2/*</Arg>
 <Arg>/your/path/to/the/*solr*.war</Arg>
 <Set name="extractWAR">true</Set>
<Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set>
 <Call name="addEnvEntry">
   <Arg>*solr*/home</Arg>
   <Arg type="String">/your/path/to/your/alternate/*solr*/home/dir</Arg>
 </Call>
</Call>

Jetty complains that:

2007-02-26 18:36:04.874::INFO: Logging to STDERR via org.mortbay.log.StdErrLog 2007-02-26 18:36:05.066::WARN: Config error at <Call name="addWebApplication"><Arg>/solr1/*</Arg><Arg>/your/path/to/the/solr.war</Arg><Set name="extractWAR">true</Set><Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set><Call name="addEnvEntry"><Arg>solr/home</Arg><Arg type="String">/your/path/to/your/solr/home/dir</Arg></Call></Call>
2007-02-26 18:36:05.066::WARN:  EXCEPTION
java.lang.IllegalStateException: No Method: <Call name="addWebApplication"><Arg>/solr1/*</Arg><Arg>/your/path/to/the/solr.war</Arg><Set name="extractWAR">true</Set><Set name="defaultsDescriptor">org/mortbay/jetty/servlet/webdefault.xml</Set><Call name="addEnvEntry"><Arg>solr/home</Arg><Arg type="String">/your/path/to/your/solr/home/dir</Arg></Call></Call> on class org.mortbay.jetty.Server
       at org.mortbay.xml.XmlConfiguration.call(XmlConfiguration.java:548)
at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:241) at org.mortbay.xml.XmlConfiguration.configure(XmlConfiguration.java:203)
       at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:919)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at org.mortbay.start.Main.invokeMain(Main.java:183)
       at org.mortbay.start.Main.start(Main.java:497)
       at org.mortbay.start.Main.main(Main.java:115)
2007-02-26 18:36:05.068::INFO:  Shutdown hook executing
2007-02-26 18:36:05.068::INFO:  Shutdown hook complete

I've been looking at the Jetty API and it looks like those methods are deprecated in the latest versions of Jetty. Anyway, I can get several instances to run together using the descriptor shown below and several war files

<Call name="addLifeCycle">
 <Arg>
   <New class="org.mortbay.jetty.deployer.WebAppDeployer">
     <Set name="contexts"><Ref id="Contexts"/></Set>
<Set name="webAppDir"><SystemProperty name="jetty.home" default="."/>/webapps-plus</Set>
     <Set name="parentLoaderPriority">false</Set>
     <Set name="extract">true</Set>
     <Set name="allowDuplicates">false</Set>
<Set name="defaultsDescriptor"><SystemProperty name="jetty.home" default="."/>/etc/webdefault.xml</Set>
   </New>
 </Arg>
</Call>

This is good enough for me but the problem then is that all point to the same data/index folder sharing the same index and I need them to use different indexes. The question is, how can you configure solr.home differently for each of the solr instances deployed in the webapps-plus folder?

It would be equally valid if there is a way of fixing the xml in the wiki so individual war files can be specified passing a different solr.home to each..

thanks,

galo.

Reply via email to