Hi,
I am using Hibernate Search for a while. I have a dedicated server which continuously does the indexing and writes to a shared directory on a unix box. My jboss runs on a separate box and have access to the indexes directory.
Every thing is fine, and am able to search also, and the performance is reasonably ok. But if I search for some 10 - 30 times repeatedly I am getting this exception :
Code:
javax.persistence.PersistenceException: org.hibernate.search.SearchException: Unable to close Lucene IndexReader
at org.hibernate.search.jpa.impl.FullTextQueryImpl.throwPersistenceException(FullTextQueryImpl.java:128)
at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:96)
at com.sonymusic.aoma.search.lucene.ui.LuceneSearchAction.searchAndPopulatePage(LuceneSearchAction.java:190)
at com.sonymusic.aoma.search.lucene.ui.LuceneSearchAction.doAction(LuceneSearchAction.java:157)
at com.sonymusic.aoma.dispatcher.actions.SimpleDispatcherAction.executeAction(SimpleDispatcherAction.java:388)
at com.sonymusic.aoma.dispatcher.DispatcherAction.execute(DispatcherAction.java:134)
at com.sonymusic.aoma.dispatcher.DispatcherServlet.doChain(DispatcherServlet.java:119)
at com.sonymusic.aoma.dispatcher.DispatcherServlet.doChain(DispatcherServlet.java:97)
at com.sonymusic.aoma.dispatcher.DispatcherServlet.service(DispatcherServlet.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
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:230)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437)
at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:366)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
at java.lang.Thread.run(Thread.java:595)
Caused by: org.hibernate.search.SearchException: Unable to close Lucene IndexReader
at org.hibernate.search.reader.SharedReaderProvider.replaceActiveReader(SharedReaderProvider.java:190)
at org.hibernate.search.reader.SharedReaderProvider.openReader(SharedReaderProvider.java:92)
at org.hibernate.search.query.FullTextQueryImpl.buildSearcher(FullTextQueryImpl.java:454)
at org.hibernate.search.query.FullTextQueryImpl.list(FullTextQueryImpl.java:228)
at org.hibernate.search.jpa.impl.FullTextQueryImpl.getResultList(FullTextQueryImpl.java:85)
... 26 more
Caused by: java.io.IOException: Stale NFS file handle
at java.io.RandomAccessFile.close0(Native Method)
at java.io.RandomAccessFile.close(RandomAccessFile.java:532)
at org.apache.lucene.store.FSDirectory$FSIndexInput$Descriptor.close(FSDirectory.java:514)
at org.apache.lucene.store.FSDirectory$FSIndexInput.close(FSDirectory.java:561)
at org.apache.lucene.index.SegmentReader.closeNorms(SegmentReader.java:540)
at org.apache.lucene.index.SegmentReader.doClose(SegmentReader.java:269)
at org.apache.lucene.index.IndexReader.close(IndexReader.java:842)
at org.apache.lucene.index.MultiReader.doClose(MultiReader.java:255)
at org.apache.lucene.index.IndexReader.close(IndexReader.java:842)
at org.hibernate.search.reader.SharedReaderProvider.replaceActiveReader(SharedReaderProvider.java:187)
Anybody know, whats wrong here ? I left the IndexReader as default only which means its shared. Any help is highly appreciated.
thanks
Anil.