Я работаю над Solr в своем приложении. Я использую apache-solr-solrj-1.4.0.jar.
Когда я пытаюсь вызвать add(SolrInputDocument doc)
из CommonsHttpSolrServer
, я получаю следующее исключение:
org.apache.solr.common.SolrException: внутренняя ошибка сервера Внутренняя ошибка сервера at org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:424) на org.apache.solr.client.solrj.impl.CommonsHttpSolrServer.request(CommonsHttpSolrServer.java:243) at org.apache.solr.client.solrj.request.AbstractUpdateRequest.process(AbstractUpdateRequest.java:105) на org.apache.solr.client.solrj.SolrServer.add(SolrServer.java:64)
Кто-нибудь может помочь мне решить эту проблему?
Ниже перечислены атрибуты в файле solrconfig.xml:
<lockType>native</lockType>
<unlockOnStartup>false</unlockOnStartup>
<reopenReaders>true</reopenReaders>
Я получаю следующее исключение в журналах сервера solr:
24 мая 2010 г. 2:51:22 org.apache.solr.common.SolrException log SEVERE: java.lang.NullPointerException at org.apache.solr.handler.ReplicationHandler $4.postCommit(ReplicationHandler.java:922) at org.apache.solr.update.UpdateHandler.callPostCommitCallbacks(UpdateHandler.java:78) at org.apache.solr.update.DirectUpdateHandler2.commit(DirectUpdateHandler2.java:411) на org.apache.solr.update.processor.RunUpdateProcessor.processCommit(RunUpdateProcessorFactory.java:85) at org.apache.solr.handler.RequestHandlerUtils.handleCommit(RequestHandlerUtils.java:107) at org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:48) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) на org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) на org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) на org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) на org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) на org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) на org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:210) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) на org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) на org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) на org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket $SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:690) в java.lang.Thread.run(Thread.java:619)
INFO: {} 0 1039 24 мая 2010 г. 2:52:29 org.apache.solr.common.SolrException log SEVERE: org.apache.lucene.store.LockObtainFailedException: время ожидания блокировки: NativeFSLock @./Solr/data/index/lucene-be18de26b941317e71dc59f9e5ba63c4-write.lock at org.apache.lucene.store.Lock.obtain(Lock.java:85) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:1545) на org.apache.lucene.index.IndexWriter. (IndexWriter.java:1402) at org.apache.solr.update.SolrIndexWriter. (SolrIndexWriter.java:190) at org.apache.solr.update.UpdateHandler.createMainIndexWriter(UpdateHandler.java:98) at org.apache.solr.update.DirectUpdateHandler2.openWriter(DirectUpdateHandler2.java:173) at org.apache.solr.update.DirectUpdateHandler2.addDoc(DirectUpdateHandler2.java:220) на org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:61) at org.apache.solr.handler.XMLLoader.processUpdate(XMLLoader.java:139) на org.apache.solr.handler.XMLLoader.load(XMLLoader.java:69) на org.apache.solr.handler.ContentStreamHandlerBase.handleRequestBody(ContentStreamHandlerBase.java:54) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131) на org.apache.solr.core.SolrCore.execute(SolrCore.java:1316) at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338) на org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) на org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) на org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) на org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) на org.apache.catalina.ha.session.JvmRouteBinderValve.invoke(JvmRouteBinderValve.java:210) at org.apache.catalina.ha.tcp.ReplicationValve.invoke(ReplicationValve.java:347) на org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) на org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190) at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:291) at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:769) на org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:698) at org.apache.jk.common.ChannelSocket $SocketConnection.runIt(ChannelSocket.java:891) at org.apache.tomcat.util.threads.ThreadPool $ControlRunnable.run(ThreadPool.java:690) в java.lang.Thread.run(Thread.java:619)