zoukankan      html  css  js  c++  java
  • 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
    >
    >
    >

  • 相关阅读:
    ERROR 3009 (HY000): Column count of mysql.user is wrong. Expected 45, found 43. Created with MySQL 5
    centos mysql忘记密码找回(仅限mysql5.7)
    采购文件中 RFI、RFQ、RFP、IFB的区别
    VS2017安装时自动退出
    centos 虚拟机中修改屏幕分辨率
    Solved Unable to copy the source file ./installer/services.sh to the destination file /etc/vmware-t
    Idea实用功能手记
    mybatis,mybatis-generator,mybatis-plus手记
    springboot常用方法手记
    springboot日常问题处理手记
  • 原文地址:https://www.cnblogs.com/cy163/p/1567996.html
Copyright © 2011-2022 走看看