Hi, I met FileNotFoundException when using lucene 2.4.0. Please see the stack trace[1] below. I checked the code of lucene-2.4, found the following code throws FileNotFoundException:
file = new RandomAccessFile(path, "rw"); I checked system log, and found a warning before the exception: unable to unlink '/sdcard/.servo/.index/_3.fdt' (errno=2) Any hint what the problem is? Possible race condition during commit? My index process was killed by system somtimes, but I assume it's OK for lucene-2.4. Thanks a lot in advance! [1] java.io.FileNotFoundException: /sdcard/.servo/.index/_3.fdt at org.apache.harmony.luni.platform.OSFileSystem.open(OSFileSystem.java:227) at java.io.RandomAccessFile.<init>(RandomAccessFile.java:109) at org.apache.lucene.store.FSDirectory$FSIndexOutput.<init>(FSDirectory.java:639) at org.apache.lucene.store.FSDirectory.createOutput(FSDirectory.java:442) at org.apache.lucene.index.FieldsWriter.<init>(FieldsWriter.java:62) at org.apache.lucene.index.StoredFieldsWriter.initFieldsWriter(StoredFieldsWriter.java:67) at org.apache.lucene.index.StoredFieldsWriter.finishDocument(StoredFieldsWriter.java:141) at org.apache.lucene.index.StoredFieldsWriter$PerDoc.finish(StoredFieldsWriter.java:187) at org.apache.lucene.index.DocumentsWriter$WaitQueue.writeDocument(DocumentsWriter.java:1408) at org.apache.lucene.index.DocumentsWriter$WaitQueue.add(DocumentsWriter.java:1427) at org.apache.lucene.index.DocumentsWriter.finishDocument(DocumentsWriter.java:1062) at org.apache.lucene.index.DocumentsWriter.updateDocument(DocumentsWriter.java:768) at org.apache.lucene.index.DocumentsWriter.addDocument(DocumentsWriter.java:743) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1902) at org.apache.lucene.index.IndexWriter.addDocument(IndexWriter.java:1880) -- Best regards, Andrew Zhang db4o - database for Android: www.db4o.com http://zhanghuangzhu.blogspot.com/