• could not find system property or JNDI


    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.
    > nick@xxxxxxxxxxx
    > 804-550-9406
    >
    > -----Original Message-----
    > From: Chris Hostetter [mailto:hossman_lucene@xxxxxxxxx]
    > Sent: Tuesday, February 03, 2009 8:31 PM
    > To: solr-user@xxxxxxxxxxxxxxxxx
    > 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
    >
    >
    >

  • 相关阅读:
    prometheus监控zookeeper
    prometheus监控mongo
    python游戏练手--乒乓球
    python游戏练手--贪吃蛇
    python爬虫练手--糗事百科图片获取
    Prometheus监控安装及使用(一)
    善用k8s explain
    k8s deployment
    k8s pod
    k8s deployment 金丝雀发布 更新的 暂停 恢复 回滚
  • 原文地址:https://www.cnblogs.com/cy163/p/1567996.html
Copyright © 2020-2023  润新知