Hi Erick, Sorry for not providing the context. The problem is that I couldn't work out the exact test case for causing this - I will definitely post one if I find. There's a possible cause for this but I don't want to speculate as I don't know for sure.
Just to answer (some of) your questions, this error has nothing to do with migration, closing, etc. and this only occurred on v2.4.0. As you can probably see from the stack trace, I'm simply opening an IndexSearcher. If anyone's interested, I can post compressed folder with index files (3Mb uncompressed) which are causing trouble. Currently, a very basic test on this folder fails with the same exception: 8<------------------------------- import org.apache.lucene.search.IndexSearcher; public class Test { public static void main( String[] args ) throws Exception { new IndexSearcher( "/home/mindas/temp/luke/collection_32/checkedout_index" ); } } 8<------------------------------- My point of this post was - should the constructor ever throw this exception? Can this not be gracefully swallowed and handled inside? Regards, Mindaugas On Wed, Oct 29, 2008 at 12:51 PM, Erick Erickson <[EMAIL PROTECTED]> wrote: > Well, I'd expect it to throw this error if you tried to close > an already-closed FSDirectory, But that's pretty useless since > you don't provide much context around your problem. > > Did this just start occurring? Did you just migrate to 2.4 from > a previous version? Are you sure you aren't closing an already- > closed FSDir? What was the last thing you changed before > you saw this behavior? Did it ever work? > > Best > Erick > > On Wed, Oct 29, 2008 at 8:42 AM, Mindaugas Žakšauskas <[EMAIL > PROTECTED]>wrote: > >> Hi, >> >> We're using Lucene 2.4.0 on Linux. Java version is 1.6.0_06. >> >> Is there any reason why Lucene would be throwing this error: >> >> org.apache.lucene.store.AlreadyClosedException: this Directory is closed >> at org.apache.lucene.store.Directory.ensureOpen(Directory.java:220) >> at >> org.apache.lucene.store.FSDirectory.fileExists(FSDirectory.java:326) >> at >> org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:680) >> at >> org.apache.lucene.index.DirectoryIndexReader.open(DirectoryIndexReader.java:111) >> at org.apache.lucene.index.IndexReader.open(IndexReader.java:316) >> at org.apache.lucene.index.IndexReader.open(IndexReader.java:206) >> at >> org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:47) >> <..our own code which calls new IndexSearcher( String ) ..> >> >> If the index would be corrupted I'd expect >> org.apache.lucene.index.CorruptIndexException; similar for >> java.io.IOException, however this is something different. >> Obviously, AlreadyClosedException is a runtime exception and doesn't >> have to be declared in constructor javadoc, however, the problem is a >> bit scary as it leaves me in a position with no choice. >> Thanks is advance. >> >> Regards, >> Mindaugas >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [EMAIL PROTECTED] >> For additional commands, e-mail: [EMAIL PROTECTED] >> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]