lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael McCandless <luc...@mikemccandless.com>
Subject Re: ClosedChannelException from IndexWriter.getReader()
Date Thu, 08 Apr 2010 19:41:07 GMT
Are you using Future.cancel or directly using Thread.interrupt?  If so
it could be this nasty issue:

    https://issues.apache.org/jira/browse/LUCENE-2239

Try temporarily using a Directory impl other than NIOFSDirectory and
see if the problem still happens?

Mike

On Thu, Apr 8, 2010 at 2:14 PM, Justin <crynax@yahoo.com> wrote:
> I'm getting a ClosedChannelException from IndexWriter.getReader().  I don't think the
writer has been closed and, if it were, I would expect an AlreadyClosedException as described
in the API documentation.  Does anyone have an idea what might be wrong?  The disk is not
full and the permissions look correct.
>
> Here the stack trace from revision 926791:
>
> java.nio.channels.ClosedChannelException
>        at sun.nio.ch.FileChannelImpl.ensureOpen(FileChannelImpl.java:88)
>        at sun.nio.ch.FileChannelImpl.read(FileChannelImpl.java:613)
>        at org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:150)
>        at org.apache.lucene.store.BufferedIndexInput.readBytes(BufferedIndexInput.java:139)
>        at org.apache.lucene.index.CompoundFileReader$CSIndexInput.readInternal(CompoundFileReader.java:257)
>        at org.apache.lucene.store.BufferedIndexInput.refill(BufferedIndexInput.java:160)
>        at org.apache.lucene.store.BufferedIndexInput.readByte(BufferedIndexInput.java:39)
>        at org.apache.lucene.store.IndexInput.readInt(IndexInput.java:74)
>        at org.apache.lucene.index.FieldsReader.<init>(FieldsReader.java:114)
>        at org.apache.lucene.index.SegmentReader$CoreReaders.openDocStores(SegmentReader.java:294)
>        at org.apache.lucene.index.SegmentReader.openDocStores(SegmentReader.java:590)
>        at org.apache.lucene.index.IndexWriter$ReaderPool.get(IndexWriter.java:640)
>        at org.apache.lucene.index.IndexWriter$ReaderPool.getReadOnlyClone(IndexWriter.java:591)
>        at org.apache.lucene.index.DirectoryReader.<init>(DirectoryReader.java:138)
>        at org.apache.lucene.index.ReadOnlyDirectoryReader.<init>(ReadOnlyDirectoryReader.java:36)
>        at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:423)
>        at org.apache.lucene.index.IndexWriter.getReader(IndexWriter.java:387)
>
> Thanks,
> Justin
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message