lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Akos Tajti <akos.ta...@gmail.com>
Subject ClosedChannelException
Date Wed, 23 Feb 2011 11:24:36 GMT
Hi,

I'm using lucene 3.0.3 on ubuntu and always getting ClosedChannelException:

java.nio.channels.ClosedChannelException
at sun.nio.ch.FileChannelImpl.ensureOpen(Unknown Source)
at sun.nio.ch.FileChannelImpl.read(Unknown Source)
at
org.apache.lucene.store.NIOFSDirectory$NIOFSIndexInput.readInternal(NIOFSDirectory.java:168)
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.readVLong(IndexInput.java:99)
at org.apache.lucene.index.SegmentTermEnum.next(SegmentTermEnum.java:135)
at org.apache.lucene.index.SegmentMergeInfo.next(SegmentMergeInfo.java:69)
at
org.apache.lucene.index.DirectoryReader$MultiTermEnum.next(DirectoryReader.java:1045)
at org.apache.lucene.search.FilteredTermEnum.next(FilteredTermEnum.java:77)
at
org.apache.lucene.search.FilteredTermEnum.setEnum(FilteredTermEnum.java:56)
at org.apache.lucene.search.FuzzyTermEnum.<init>(FuzzyTermEnum.java:121)
at
org.apache.lucene.search.FuzzyLikeThisQuery.addTerms(FuzzyLikeThisQuery.java:202)
at
org.apache.lucene.search.FuzzyLikeThisQuery.rewrite(FuzzyLikeThisQuery.java:261)
at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:371)
at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
at org.apache.lucene.search.BooleanQuery.rewrite(BooleanQuery.java:386)
at org.apache.lucene.search.IndexSearcher.rewrite(IndexSearcher.java:272)
at org.apache.lucene.search.Query.weight(Query.java:100)
at org.apache.lucene.search.Searcher.createWeight(Searcher.java:147)
at org.apache.lucene.search.Searcher.search(Searcher.java:49)

This exception usually occurs when one or more3 searches run at the same
time. I modified the code to check indexReader.refCount before colsing the
indexSearcher and it seems that the problem disappeared. However, I'm not
sure that this is the best solution. Do you have any other ideas?

Thanks in advance,
Ákos Tajti

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message