I don't think there was a follow-up to this.
Aaron, please provide a listing of the directory that you are using in
IndexWriter constructor. Is it empty? What are permissions on it?
When the exception occurs, a file called write.lock should remain in
the directory. Can you ls -al that file? Is this Lucene 1.3*?
Maybe you solved the problem already. This is unlikely a Lucene bug.
Otis
--- Aaron Galea <[EMAIL PROTECTED]> wrote:
> Hi
>
> I am starting to get an error about a write.lock in lucene when
> creating an index in an empty directory. It used to work fine before
> but now it started to occur and as far as I know I didn't touch
> anything. Printing out the stack trace from the excpetion thrown I
> get the following :
>
> java.io.IOException: couldn't delete write.lock
> at org.apache.lucene.store.FSDirectory.create(Unknown Source)
> at org.apache.lucene.store.FSDirectory.getDirectory(Unknown
> Source)
> at org.apache.lucene.store.FSDirectory.getDirectory(Unknown
> Source)
> at org.apache.lucene.index.IndexWriter.<init>(Unknown Source)
> at
> qa.answerextraction.AnswerExtractionImpl.processDocument(Unknown
> Source)
> at
> qa.answerextraction.AnswerExtractionServerPOA._invoke(Unknown Source)
> at org.jacorb.poa.RequestProcessor.invokeOperation(Unknown
> Source)
> at org.jacorb.poa.RequestProcessor.process(Unknown Source)
> at org.jacorb.poa.RequestProcessor.run(Unknown Source)
>
> The code creating this problem is:
>
> IndexWriter writer;
>
> try {
> writer = new IndexWriter(indexLocation,
> sa,false);
> } catch (java.io.IOException e) {
> writer = new IndexWriter(indexLocation, sa,true);
> }
>
> This problem only happens when indexing the very first file. After
> that it works fine. All that seems it needs in the directory is a
> "segments" file.
>
> Could anyone explain to me the problem or what I am doing wrong in
> it?
>
> regards
> Aaron
__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]