Can't find resource 'solrconfig.xml'

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

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
Reply | Threaded
Open this post in threaded view
|

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

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

On Mon, Oct 31, 2011 at 8:30 PM, 刘浪 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

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

Brandon Ramirez
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:[hidden email]]
Sent: Monday, October 31, 2011 8:35 AM
To: [hidden email]
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, 刘浪 <[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

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

刘浪
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" <[hidden email]>
> 发送时间: 2011年10月31日 星期一
> 收件人: "[hidden email]" <[hidden email]>
> 抄送:
> 主题: 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:[hidden email]]
> Sent: Monday, October 31, 2011 8:35 AM
> To: [hidden email]
> 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, 刘浪 <[hidden email]> 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
> >
Reply | Threaded
Open this post in threaded view
|

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

Li Li
set JAVA_OPTS=%JAVA_OPTS% -Dsolr.solr.home=c:\xxx

On Mon, Oct 31, 2011 at 9:14 PM, 刘浪 <[hidden email]> 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" <[hidden email]>
> > 发送时间: 2011年10月31日 星期一
> > 收件人: "[hidden email]" <[hidden email]>
> > 抄送:
> > 主题: 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:[hidden email]]
> > Sent: Monday, October 31, 2011 8:35 AM
> > To: [hidden email]
> > 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, 刘浪 <[hidden email]> 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
> > >
>
Reply | Threaded
Open this post in threaded view
|

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

Chris Hostetter-3
In reply to this post by 刘浪

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: 刘浪 <[hidden email]>
: Reply-To: [hidden email]
: To: solr-user <[hidden email]>
: 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