在eclipse中Solr 4.3配置错误

时间:2013-06-11 11:27:38

标签: jsf solr

我已将solr 4.3集成到我的网络应用程序并添加了所有依赖项。当我通过Eclipse juno在tomcat上运行我的应用程序时,我收到以下错误。

注意:如果我将app.war直接部署到tomcat的webapp目录,它似乎工作正常。

HTTP状态500 - {msg = SolrCore'集合1'由于init失败而无法使用:无法加载solrconfig.xml的配置,trace = org.apache.solr.common.SolrException:SolrCore' collection1'由于init失败而无法使用:无法在org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter)的org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1212)中加载solrconfig.xml的配置。 java:248)org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)org.apache.catalina.core .ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)在org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:99)在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogVa) lve.java:953)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)org.apache.coyote .http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)在org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:589)在org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint .java:310)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)at java.lang.Thread.run( Thread.java:722)引起:org.apache.solr.common.SolrException:无法在org.apache的org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:919)加载solrconfig.xml的配置.solr.core.CoreContainer.create(CoreContainer.java:984)org.apache.solr.core.CoreContainer $ 2.call(CoreContainer.java:597)org.apache.solr.core.CoreCon在Java的java.util.concurrent.FutureTask.run(FutureTask.java:166)的java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:334)中获得$ 2.call(CoreContainer.java:592)。 util.concurrent.Executors $ RunnableAdapter.call(Executors.java:471)at java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:334)at java.util.concurrent.FutureTask.run(FutureTask.java: 166)... 3更多引起:java.io.IOException:无法找到资源' solrconfig.xml'在classpath或' solr / collection1 / conf /',cwd = / home / kumarkailash org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:337)org.apache.solr。 core.olrResourceLoader.openConfig(SolrResourceLoader.java:302)org.apache.solr.core.Config。(Config.java:122)atg.apache.solr.core.Config。(Config.java:92)at org .apache.solr.core.SolrConfig。(SolrConfig.java:119)org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:916)... 11 more,code = 500}

输入状态报告

消息{msg = SolrCore'集合1'由于init失败而无法使用:无法加载solrconfig.xml的配置,trace = org.apache.solr.common.SolrException:SolrCore' collection1'由于init失败而无法使用:无法在org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter)的org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:1212)中加载solrconfig.xml的配置。 java:248)org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:155)org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)org.apache.catalina.core .ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)在org.apache.catalina.valves.ErrorReportValve.invoke( ErrorReportValve.java:99)在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogVa) lve.java:953)org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)org.apache.coyote .http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1008)在org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:589)在org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint .java:310)java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:615)at java.lang.Thread.run( Thread.java:722)引起:org.apache.solr.common.SolrException:无法在org.apache的org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:919)加载solrconfig.xml的配置.solr.core.CoreContainer.create(CoreContainer.java:984)org.apache.solr.core.CoreContainer $ 2.call(CoreContainer.java:597)org.apache.solr.core.CoreCon在Java的java.util.concurrent.FutureTask.run(FutureTask.java:166)的java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:334)中获得$ 2.call(CoreContainer.java:592)。 util.concurrent.Executors $ RunnableAdapter.call(Executors.java:471)at java.util.concurrent.FutureTask $ Sync.innerRun(FutureTask.java:334)at java.util.concurrent.FutureTask.run(FutureTask.java: 166)... 3更多引起:java.io.IOException:无法找到资源' solrconfig.xml'在classpath或' solr / collection1 / conf /',cwd = / home / kumarkailash org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:337)org.apache.solr。 core.olrResourceLoader.openConfig(SolrResourceLoader.java:302)org.apache.solr.core.Config。(Config.java:122)atg.apache.solr.core.Config。(Config.java:92)at org .apache.solr.core.SolrConfig。(SolrConfig.java:119)org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:916)... 11 more,code = 500}

描述服务器遇到内部错误,导致无法完成此请求。 Apache Tomcat / 7.0.40

请帮忙。谢谢

1 个答案:

答案 0 :(得分:4)

似乎缺少solr.home 您可以将solr.home条目添加到web.xml本身 取消注释该行并填充正确的值: -

<env-entry>
   <env-entry-name>solr/home</env-entry-name>
   <env-entry-value>/put/your/solr/home/here</env-entry-value>
   <env-entry-type>java.lang.String</env-entry-type>
</env-entry>