2

尝试使用 Lucene 进行搜索时,我看到以下错误。(版本 1.4.3)。关于为什么我会看到这个以及如何解决它的任何想法?

Caused by: java.io.IOException: read past EOF
    at org.apache.lucene.store.InputStream.refill(InputStream.java:154)
    at org.apache.lucene.store.InputStream.readByte(InputStream.java:43)
    at org.apache.lucene.store.InputStream.readVInt(InputStream.java:83)
    at org.apache.lucene.index.FieldInfos.read(FieldInfos.java:195)
    at org.apache.lucene.index.FieldInfos.<init>(FieldInfos.java:55)
    at org.apache.lucene.index.SegmentReader.initialize(SegmentReader.java:109)
    at org.apache.lucene.index.SegmentReader.<init>(SegmentReader.java:89)
    at org.apache.lucene.index.IndexReader$1.doBody(IndexReader.java:118)
    at org.apache.lucene.store.Lock$With.run(Lock.java:109)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:111)
    at org.apache.lucene.index.IndexReader.open(IndexReader.java:106)
    at org.apache.lucene.search.IndexSearcher.<init>(IndexSearcher.java:43)

在同一环境中,我还看到以下错误:

Caused by: java.io.IOException: Lock obtain timed out:
Lock@/tmp/lucene-3ec31395c8e06a56e2939f1fdda16c67-write.lock
    at org.apache.lucene.store.Lock.obtain(Lock.java:58)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:223)
    at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:213)

相同的代码在测试环境中有效,但在生产环境中无效。无法识别两种环境之间的任何明显差异。

4

1 回答 1

5

文件权限错误(需要写入权限)或您无法访问当前进程需要的锁定文件。

于 2009-03-06T21:10:53.020 回答