SolrCore关闭,抛出NullPointerException

时间:2013-05-09 23:27:17

标签: web configuration search-engine solrj

我是第一次配置Solr。谷歌的洞察力很少。我看到的问题与我的问题类似,但不一样。

我在〜/ solr-home / solr中有一个名为collection1的SolrCore。我已经验证了Solr在启动时会读取其配置。这是我在@ solr-home / solr / solr.xml中的核心声明:

  <cores adminPath="/admin/cores" defaultCoreName="collection1" host="${host:}" hostPort="${jetty.port:}" hostContext="${hostContext:}" zkClientTimeout="${zkClientTimeout:15000}">
<core name="collection1" instanceDir="collection1" />

Solr正在Ubuntu上运行。我试图从Windows上运行的Microsoft SQL Server导入,但我没有做到建立JDBC连接。这是我的数据导入声明:

  <requestHandler name="/dataimport" class="org.apache.solr.handler.dataimport.DataImporHandler">
    <lst name="defaults">
    <str name="config">data-config.xml</str>
    </lst>

我的核心似乎是刚开始的。从日志文件:

INFO: Creating SolrCore 'collection1' using instanceDir: solr/collection1
May 09, 2013 2:52:22 PM org.apache.solr.core.SolrResourceLoader <init>
INFO: new SolrResourceLoader for directory: 'solr/collection1/'
May 09, 2013 2:52:22 PM org.apache.solr.core.SolrResourceLoader replaceClassLoader
INFO: Adding 'file:/home/moon/solr-home/solr/collection1/lib/solr-dataimporthandler-4.2.0.jar' to classloader
May 09, 2013 2:52:22 PM org.apache.solr.core.SolrResourceLoader replaceClassLoader
INFO: Adding 'file:/home/moon/solr-home/solr/collection1/lib/solr-dataimporthandler-extras-4.2.0.jar' to classloader

...

INFO: [collection1] Opening new SolrCore at solr/collection1/, dataDir=/solr-home/data/
May 09, 2013 2:52:25 PM org.apache.solr.core.JmxMonitoredMap <init>
INFO: JMX monitoring is enabled. Adding Solr mbeans to JMX Server: com.sun.jmx.mbeanserver.JmxMBeanServer@4645a73
May 09, 2013 2:52:25 PM org.apache.solr.core.SolrCore initListeners
INFO: [collection1] Added SolrEventListener for newSearcher: org.apache.solr.core.QuerySenderListener{queries=[]}
May 09, 2013 2:52:25 PM org.apache.solr.core.SolrCore initListeners
INFO: [collection1] Added SolrEventListener for firstSearcher: org.apache.solr.core.QuerySenderListener{queries=[{q=static firstSearcher warming in solrconfig.xml}]}

......但过了一会儿它关闭了:

May 09, 2013 2:52:25 PM org.apache.solr.search.SolrIndexSearcher <init>
INFO: Opening Searcher@5b27f008 main
May 09, 2013 2:52:25 PM org.apache.solr.core.SolrCore close
INFO: [collection1]  CLOSING SolrCore org.apache.solr.core.SolrCore@78a38bfb
May 09, 2013 2:52:25 PM org.apache.solr.core.QuerySenderListener newSearcher
INFO: QuerySenderListener sending requests to Searcher@5b27f008 main{StandardDirectoryReader(segments_1:1)}
May 09, 2013 2:52:25 PM org.apache.solr.update.SolrCoreState decrefSolrCoreState
INFO: Closing SolrCoreState
May 09, 2013 2:52:25 PM org.apache.solr.update.DefaultSolrCoreState closeIndexWriter
INFO: SolrCoreState ref count has reached 0 - closing IndexWriter

...然后它抛出NullPointerException:

May 09, 2013 2:52:25 PM org.apache.solr.common.SolrException log
SEVERE: java.lang.NullPointerException
        at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:181)
        at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)
        at org.apache.solr.core.SolrCore.execute(SolrCore.java:1817)
        at org.apache.solr.core.QuerySenderListener.newSearcher(QuerySenderListener.java:64)
        at org.apache.solr.core.SolrCore$5.call(SolrCore.java:1606)
        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)
        at java.lang.Thread.run(Thread.java:722)

感谢您提供任何帮助。

0 个答案:

没有答案