Thanks everyone!! Finally got a solution for this problem on Jetty Server. 

Instead of setting Java system variables like
JAVA_OPTS=-Dsolr.solr.home="C:\SOLR\apache-solr-1.3.0\apache-solr-1.3.0\example\solr",
we can provide the vm arguments directly while starting the jetty server.

I am running jetty as follows - 
java -Dsolr.solr.home=<PATH_TO_SOLR_HOME> -jar start.jar

After this I am not getting any error. :-D

Thanks,
Manu


Nicholas Piasecki-2 wrote:
> 
> For what it's worth, I bumped into
> http://jira.codehaus.org/browse/JETTY-854 on a recent Jetty installation
> when trying to set up Solr for a test run, so setting via JNDI may end
> up causing even more heartburn. I ended up just using Tomcat.
> 
> V/R,
> Nicholas Piasecki
> 
> Software Developer
> Skiviez, Inc.
> n...@skiviez.com
> 804-550-9406
> 
> -----Original Message-----
> From: Chris Hostetter [mailto:hossman_luc...@fucit.org] 
> Sent: Tuesday, February 03, 2009 8:31 PM
> To: solr-user@lucene.apache.org
> Subject: Re: Problem with setting solr.solr.home property
> 
> : Till now I was working with the jetty server bundled with the SOLR
> : distribution. But I want to deploy solr.war to another jetty server.
> Here I
> : am facing some problem with solr/home. Whenever I start the jetty
> server, I
> : get the following error - 
>       ...
> : INFO: solr home defaulted to 'solr/' (could not find system property
> or
> : JNDI)
>       ...
> : SEVERE: Could not start SOLR. Check solr/home property
> : java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in
> : classpath or 'solr/conf/', cwd=C:\jetty-6.1.3\je
>       ...
> 
> : I have tried following options - 
> : 
> : 1. Added system property on windows as 'solr.solr.home'. I am able to
> get
> : its value when I check through command prompt.
> : http://www.nabble.com/file/p21808987/cmd.gif 
> 
> i don't know much about windows, but i don't  think that's the same
> thing 
> as a java system property (that looks like an enviornment variable to
> me)
> 
> : 2. I also tried adding vm argument through command prompt as follows -
> 
> : set
> :
> JAVA_OPTS=-Dsolr.solr.home="C:\SOLR\apache-solr-1.3.0\apache-solr-1.3.0\
> example\solr"
> : 
> : But in all the case, I am getting the above exception.
> 
> what about the INFO line i quoted above (solr home defaulted to 
> 'solr/'...) are you seeing that line even when you modify the JAVA_OPTS 
> this way?  (i'm wondering if perhaps you are setting the system property
> 
> but maybe the quotes or formating or soemthing is confusing it when
> trying 
> to find that directory) ... it would be helpful to see the *exact* logs 
> and error messages you get when trying the JAVA_OPTS method ... i'm 
> suspicious that maybe it's a slightly different error.
> 
> : 3. I tried to retrieve the System property through java code (It is
> the
> : similar code that is triggered by Solr, SolrResourceLoader.java
> : locateInstanceDir() method). I get the value of system property in the
> code.
> 
> your code looks right, but i don't understand exactly what you're saying
> 
> -- do you in fact see the path in your logging output?  if so then i'm 
> more confident it's a problem with formating the path correctly so java 
> understands it.
> 
> FYI: in my opinion the best way to set solr home is using JNDI, but you 
> didn't mention trying that...
>       http://wiki.apache.org/solr/SolrJetty
> 
> 
> -Hoss
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Problem-with-setting-solr.solr.home-property-tp21808987p21825052.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to