You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by 刘浪 <li...@eisoo.com> on 2011/10/31 13:30:21 UTC

Can't find resource 'solrconfig.xml'

Hi,
      After I start tomcat, I input http://localhost:8080/solr/admin. It can display. But in the tomcat, I find an exception like "Can't find resource 'solrconfig.xml' in classpath or 'solr\.\conf/', cwd=D:\Program Files (x86)\apache-tomcat-6.0.33\bin". It occures before "Server start up in 1682 ms."
      What should I do?Thank you very much.

      Solr Directory: D:\Program Files (x86)\solr. It contents bin, conf, data, solr.xml, and README.txt.
      Tomcat Directory: D:\Program Files (x86)\apache-tomcat-6.0.33.

Sincerely,
Amos

Re: Can't find resource 'solrconfig.xml'

Posted by Chris Hostetter <ho...@fucit.org>.
rather then mucking with system properties, i find that using JNDI is the 
easiest and cleanest way to configure solr home with tomcat.

https://wiki.apache.org/solr/SolrTomcat#Configuring_Solr_Home_with_JNDI

...those instructions are fairly simple, and will work on both windows and 
linux (just with differnet paths) but someone also did a more detailed 
breakdown specificly for windows on the same page...

https://wiki.apache.org/solr/SolrTomcat#Tomcat_on_Windows



: Date: Mon, 31 Oct 2011 20:30:21 +0800 (CST)
: From: 刘浪 <li...@eisoo.com>
: Reply-To: solr-user@lucene.apache.org
: To: solr-user <so...@lucene.apache.org>
: Subject: Can't find resource 'solrconfig.xml'
: 
: Hi,
:       After I start tomcat, I input http://localhost:8080/solr/admin. It can display. But in the tomcat, I find an exception like "Can't find resource 'solrconfig.xml' in classpath or 'solr\.\conf/', cwd=D:\Program Files (x86)\apache-tomcat-6.0.33\bin". It occures before "Server start up in 1682 ms."
:       What should I do?Thank you very much.
: 
:       Solr Directory: D:\Program Files (x86)\solr. It contents bin, conf, data, solr.xml, and README.txt.
:       Tomcat Directory: D:\Program Files (x86)\apache-tomcat-6.0.33.
: 
: Sincerely,
: Amos
: 

-Hoss

Re: RE: Can't find resource 'solrconfig.xml'

Posted by Li Li <fa...@gmail.com>.
set JAVA_OPTS=%JAVA_OPTS% -Dsolr.solr.home=c:\xxx

On Mon, Oct 31, 2011 at 9:14 PM, 刘浪 <li...@eisoo.com> wrote:

> Hi Li Li,
>        I don't know where I should add in catalina.bat.  I have know Linux
> how to do it, but my OS is windows.
>        Thank you very much.
>
> Sincerely,
> Amos
>
>
> this is the part of catalina.bat:
>
> rem Execute Java with the applicable properties
> if not "%JPDA%" == "" goto doJpda
> if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
> %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
> -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
> goto end
> :doSecurity
> %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS%
> -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
> goto end
> :doJpda
> if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
> %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS%
> -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
> goto end
> :doSecurityJpda
> %_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS%
> -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%"
> -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%"
> -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%"
> -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
> goto end
>
> :end
>
>
>
> --
>
>
> > -----原始邮件-----
> > 发件人: "Brandon Ramirez" <Br...@elementk.com>
> > 发送时间: 2011年10月31日 星期一
> > 收件人: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> > 抄送:
> > 主题: RE: Can't find resource 'solrconfig.xml'
> >
> > I have found setenv.sh to be very helpful.  It's a hook where you can
> setup environment variables and java options without modifying your
> catalina.sh script.  This makes upgrading a whole lot easier.
> >
> >
> > Brandon Ramirez | Office: 585.214.5413 | Fax: 585.295.4848
> > Software Engineer II | Element K | www.elementk.com
> >
> >
> > -----Original Message-----
> > From: Li Li [mailto:fancyerii@gmail.com]
> > Sent: Monday, October 31, 2011 8:35 AM
> > To: solr-user@lucene.apache.org
> > Subject: Re: Can't find resource 'solrconfig.xml'
> >
> > modify catalina.sh(bat)
> > adding java startup params:
> > -Dsolr.solr.home=/your/path
> >
> > On Mon, Oct 31, 2011 at 8:30 PM, 刘浪 <li...@eisoo.com> wrote:
> >
> > > Hi,
> > >      After I start tomcat, I input http://localhost:8080/solr/admin.
> > > It can display. But in the tomcat, I find an exception like "Can't
> > > find resource 'solrconfig.xml' in classpath or 'solr\.\conf/',
> > > cwd=D:\Program Files (x86)\apache-tomcat-6.0.33\bin". It occures
> > > before "Server start up in 1682 ms."
> > >      What should I do?Thank you very much.
> > >
> > >      Solr Directory: D:\Program Files (x86)\solr. It contents bin,
> > > conf, data, solr.xml, and README.txt.
> > >      Tomcat Directory: D:\Program Files (x86)\apache-tomcat-6.0.33.
> > >
> > > Sincerely,
> > > Amos
> > >
>

Re:RE: Can't find resource 'solrconfig.xml'

Posted by 刘浪 <li...@eisoo.com>.
Hi Li Li,
        I don't know where I should add in catalina.bat.  I have know Linux how to do it, but my OS is windows.
        Thank you very much.

Sincerely,
Amos


this is the part of catalina.bat:

rem Execute Java with the applicable properties
if not "%JPDA%" == "" goto doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurity
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doJpda
if not "%SECURITY_POLICY_FILE%" == "" goto doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end
:doSecurityJpda
%_EXECJAVA% %JAVA_OPTS% %CATALINA_OPTS% %JPDA_OPTS% %DEBUG_OPTS% -Djava.endorsed.dirs="%JAVA_ENDORSED_DIRS%" -classpath "%CLASSPATH%" -Djava.security.manager -Djava.security.policy=="%SECURITY_POLICY_FILE%" -Dcatalina.base="%CATALINA_BASE%" -Dcatalina.home="%CATALINA_HOME%" -Djava.io.tmpdir="%CATALINA_TMPDIR%" %MAINCLASS% %CMD_LINE_ARGS% %ACTION%
goto end

:end



--


> -----原始邮件-----
> 发件人: "Brandon Ramirez" <Br...@elementk.com>
> 发送时间: 2011年10月31日 星期一
> 收件人: "solr-user@lucene.apache.org" <so...@lucene.apache.org>
> 抄送: 
> 主题: RE: Can't find resource 'solrconfig.xml'
> 
> I have found setenv.sh to be very helpful.  It's a hook where you can setup environment variables and java options without modifying your catalina.sh script.  This makes upgrading a whole lot easier.
> 
> 
> Brandon Ramirez | Office: 585.214.5413 | Fax: 585.295.4848 
> Software Engineer II | Element K | www.elementk.com
> 
> 
> -----Original Message-----
> From: Li Li [mailto:fancyerii@gmail.com] 
> Sent: Monday, October 31, 2011 8:35 AM
> To: solr-user@lucene.apache.org
> Subject: Re: Can't find resource 'solrconfig.xml'
> 
> modify catalina.sh(bat)
> adding java startup params:
> -Dsolr.solr.home=/your/path
> 
> On Mon, Oct 31, 2011 at 8:30 PM, 刘浪 <li...@eisoo.com> wrote:
> 
> > Hi,
> >      After I start tomcat, I input http://localhost:8080/solr/admin. 
> > It can display. But in the tomcat, I find an exception like "Can't 
> > find resource 'solrconfig.xml' in classpath or 'solr\.\conf/', 
> > cwd=D:\Program Files (x86)\apache-tomcat-6.0.33\bin". It occures 
> > before "Server start up in 1682 ms."
> >      What should I do?Thank you very much.
> >
> >      Solr Directory: D:\Program Files (x86)\solr. It contents bin, 
> > conf, data, solr.xml, and README.txt.
> >      Tomcat Directory: D:\Program Files (x86)\apache-tomcat-6.0.33.
> >
> > Sincerely,
> > Amos
> >

RE: Can't find resource 'solrconfig.xml'

Posted by Brandon Ramirez <Br...@elementk.com>.
I have found setenv.sh to be very helpful.  It's a hook where you can setup environment variables and java options without modifying your catalina.sh script.  This makes upgrading a whole lot easier.


Brandon Ramirez | Office: 585.214.5413 | Fax: 585.295.4848 
Software Engineer II | Element K | www.elementk.com


-----Original Message-----
From: Li Li [mailto:fancyerii@gmail.com] 
Sent: Monday, October 31, 2011 8:35 AM
To: solr-user@lucene.apache.org
Subject: Re: Can't find resource 'solrconfig.xml'

modify catalina.sh(bat)
adding java startup params:
-Dsolr.solr.home=/your/path

On Mon, Oct 31, 2011 at 8:30 PM, 刘浪 <li...@eisoo.com> wrote:

> Hi,
>      After I start tomcat, I input http://localhost:8080/solr/admin. 
> It can display. But in the tomcat, I find an exception like "Can't 
> find resource 'solrconfig.xml' in classpath or 'solr\.\conf/', 
> cwd=D:\Program Files (x86)\apache-tomcat-6.0.33\bin". It occures 
> before "Server start up in 1682 ms."
>      What should I do?Thank you very much.
>
>      Solr Directory: D:\Program Files (x86)\solr. It contents bin, 
> conf, data, solr.xml, and README.txt.
>      Tomcat Directory: D:\Program Files (x86)\apache-tomcat-6.0.33.
>
> Sincerely,
> Amos
>

Re: Can't find resource 'solrconfig.xml'

Posted by Li Li <fa...@gmail.com>.
modify catalina.sh(bat)
adding java startup params:
-Dsolr.solr.home=/your/path

On Mon, Oct 31, 2011 at 8:30 PM, 刘浪 <li...@eisoo.com> wrote:

> Hi,
>      After I start tomcat, I input http://localhost:8080/solr/admin. It
> can display. But in the tomcat, I find an exception like "Can't find
> resource 'solrconfig.xml' in classpath or 'solr\.\conf/', cwd=D:\Program
> Files (x86)\apache-tomcat-6.0.33\bin". It occures before "Server start up
> in 1682 ms."
>      What should I do?Thank you very much.
>
>      Solr Directory: D:\Program Files (x86)\solr. It contents bin, conf,
> data, solr.xml, and README.txt.
>      Tomcat Directory: D:\Program Files (x86)\apache-tomcat-6.0.33.
>
> Sincerely,
> Amos
>