Solr 4.4 / tomcat 7.0.56 - NullpointerException

时间:2014-11-04 15:13:56

标签: tomcat7 solr4

我正在尝试启动并运行solr索引,但现在我卡住了。我猜SolrDispatchFilter有什么用,但是什么?我唯一的例外是来自catalina.out:

22676 [http-bio-9090-exec-1] ERROR org.apache.solr.servlet.SolrDispatchFilter - null:org.apache.solr.common.SolrException: SolrCore 'people' is not available due to init failure: Error opening new searcher
at org.apache.solr.core.CoreContainer.getCore(CoreContainer.java:860)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:251)
at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:158)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:950)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:421)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1070)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:611)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:835)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:629)
at org.apache.solr.core.CoreContainer.createFromLocal(CoreContainer.java:622)
at org.apache.solr.core.CoreContainer.create(CoreContainer.java:657)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:364)
at org.apache.solr.core.CoreContainer$1.call(CoreContainer.java:356)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
at java.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)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
... 1 more
Caused by: org.apache.solr.common.SolrException: Error opening new searcher
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1522)
at org.apache.solr.core.SolrCore.getSearcher(SolrCore.java:1634)
at org.apache.solr.core.SolrCore.<init>(SolrCore.java:810)
... 13 more
Caused by: org.apache.solr.common.SolrException: Error opening Reader
at org.apache.solr.search.SolrIndexSearcher.getReader(SolrIndexSearcher.java:177)
at org.apache.solr.search.SolrIndexSearcher.<init>(SolrIndexSearcher.java:188)
at org.apache.solr.search.SolrIndexSearcher.<init>(SolrIndexSearcher.java:184)
at org.apache.solr.core.SolrCore.openNewSearcher(SolrCore.java:1497)
... 15 more
Caused by: java.lang.NullPointerException
at org.apache.lucene.codecs.BlockTreeTermsReader.<init>(BlockTreeTermsReader.java:162)
at org.apache.lucene.codecs.lucene41.Lucene41PostingsFormat.fieldsProducer(Lucene41PostingsFormat.java:437)
at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat$FieldsReader.<init>(PerFieldPostingsFormat.java:194)
at org.apache.lucene.codecs.perfield.PerFieldPostingsFormat.fieldsProducer(PerFieldPostingsFormat.java:233)
at org.apache.lucene.index.SegmentCoreReaders.<init>(SegmentCoreReaders.java:127)
at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:56)
at org.apache.lucene.index.StandardDirectoryReader$1.doBody(StandardDirectoryReader.java:62)
at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:812)
at org.apache.lucene.index.StandardDirectoryReader.open(StandardDirectoryReader.java:52)
at org.apache.lucene.index.DirectoryReader.open(DirectoryReader.java:88)
at org.apache.solr.core.StandardIndexReaderFactory.newReader(StandardIndexReaderFactory.java:34)
at org.apache.solr.search.SolrIndexSearcher.getReader(SolrIndexSearcher.java:174)
... 18 more

日志localhost.yyyy-mm-dd.log也不例外。

我试图将solrconfig.xml中的requestDispatcher handleSelect =“true”设置为true和false并将其注释掉,但没有任何帮助。

有什么想法吗?

编辑:为了将来参考,我有一个损坏的索引,不确定这个异常是如何链接的,但无论如何通过修复索引解决了。

1 个答案:

答案 0 :(得分:0)

我今天遇到了这个问题。我正在使用Solr 4.10.2

此页面很有帮助。我在Solr日志文件中收到类似的错误消息 我删除了/solr.4.10.2/blah_blah/solr/core_name/data/index/中的所有文件。将blah_blahcore_name替换为您拥有的目录名称和核心名称。然后,我重新启动了Solr。然后,我使用完整索引选项对导致错误的核心执行了数据导入。