lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nicholas Piasecki" <>
Subject RE: Problem with setting solr.solr.home property
Date Wed, 04 Feb 2009 02:01:58 GMT
For what it's worth, I bumped into 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.

Nicholas Piasecki

Software Developer
Skiviez, Inc.

-----Original Message-----
From: Chris Hostetter [] 
Sent: Tuesday, February 03, 2009 8:31 PM
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
: 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
: its value when I check through command prompt.

i don't know much about windows, but i don't  think that's the same
as a java system property (that looks like an enviornment variable to

: 2. I also tried adding vm argument through command prompt as follows -

: set
: 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
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
: similar code that is triggered by Solr,
: locateInstanceDir() method). I get the value of system property in the

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...


View raw message