lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manupriya <manupriya.si...@gmail.com>
Subject Problem with setting solr.solr.home property
Date Tue, 03 Feb 2009 12:33:17 GMT

Hi,

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 - 
----------------------------------------------------------------------------------------------------
2009-02-03 17:45:48.900::INFO:  Extract
jar:file:/C:/jetty-6.1.3/jetty-6.1.3/webapps/solr.war!/ to C:\DOCUME~1\MANUP
0_8080_solr.war__solr__7k9npr\webapp
Feb 3, 2009 5:45:53 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init()
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: No /solr/home in JNDI
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: solr home defaulted to 'solr/' (could not find system property or
JNDI)
Feb 3, 2009 5:45:53 PM org.apache.solr.core.CoreContainer$Initializer
initialize
INFO: looking for solr.xml: C:\jetty-6.1.3\jetty-6.1.3\solr\solr.xml
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr/'
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader
createClassLoader
INFO: Reusing parent classloader
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: No /solr/home in JNDI
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: solr home defaulted to 'solr/' (could not find system property or
JNDI)
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: Solr home set to 'solr/'
Feb 3, 2009 5:45:53 PM org.apache.solr.core.SolrResourceLoader
createClassLoader
INFO: Reusing parent classloader
Feb 3, 2009 5:45:53 PM org.apache.solr.servlet.SolrDispatchFilter init
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
        at
org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:194)
        at
org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:162)
        at org.apache.solr.core.Config.<init>(Config.java:100)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:113)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:70)
        at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
        at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
        at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
        at org.mortbay.jetty.Server.doStart(Server.java:210)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        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)
Feb 3, 2009 5:45:53 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.RuntimeException: Can't find resource 'solrconfig.xml' in
classpath or 'solr/conf/', cwd=C:\jetty-
        at
org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:194)
        at
org.apache.solr.core.SolrResourceLoader.openConfig(SolrResourceLoader.java:162)
        at org.apache.solr.core.Config.<init>(Config.java:100)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:113)
        at org.apache.solr.core.SolrConfig.<init>(SolrConfig.java:70)
        at
org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:117)
        at
org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:69)
        at
org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:99)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:594)
        at org.mortbay.jetty.servlet.Context.startContext(Context.java:139)
        at
org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1218)
        at
org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:500)
        at
org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:448)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at
org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:161)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:147)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at
org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:117)
        at org.mortbay.jetty.Server.doStart(Server.java:210)
        at
org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:40)
        at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:929)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
        at java.lang.reflect.Method.invoke(Unknown Source)
        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)

Feb 3, 2009 5:45:54 PM org.apache.solr.servlet.SolrDispatchFilter init
INFO: SolrDispatchFilter.init() done
Feb 3, 2009 5:45:54 PM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init()
Feb 3, 2009 5:45:54 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: No /solr/home in JNDI
Feb 3, 2009 5:45:54 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: solr home defaulted to 'solr/' (could not find system property or
JNDI)
Feb 3, 2009 5:45:54 PM org.apache.solr.servlet.SolrServlet init
INFO: SolrServlet.init() done
Feb 3, 2009 5:45:54 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: No /solr/home in JNDI
Feb 3, 2009 5:45:54 PM org.apache.solr.core.SolrResourceLoader
locateInstanceDir
INFO: solr home defaulted to 'solr/' (could not find system property or
JNDI)
Feb 3, 2009 5:45:54 PM org.apache.solr.servlet.SolrUpdateServlet init
INFO: SolrUpdateServlet.init() done
------------------------------------------------------------------------------------------------------

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 

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.

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.

I dont understand that if I am able to retrieve the same system property
through following Java code, then why am I getting an exception on starting
the server. 
------------------------------------------------------ 
 String prop = project + ".solr.home";
      home = System.getProperty(prop);
      if( home != null ) {
        log.info("using system property "+prop+": " + home );
      }
--------------------------------------------------------

I think I am missing out on something important. Can someone help me with
the syntax/approach that I should use to specify solr.solr.home?

Thanks,
Manu

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


Mime
View raw message