lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Aaron Galea" <ag...@nextgen.net.mt>
Subject write.lock
Date Fri, 05 Dec 2003 22:48:10 GMT
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 




________________________________________________________________
Sent through the WebMail system at nextgen.net.mt

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Mime
View raw message