You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Steve Rajavuori <St...@opin.com> on 2004/07/16 00:20:44 UTC

Lock file problem

I'm having a problem with Lucene obtaining a lock file on Windows. Running
1.4 RC3, I see the error below repeatedly. I try stopping my process,
deleting the file, then restarting. The error just occurs again every time.

java.io.IOException: Lock obtain timed out:
Lock@C:\WINNT\TEMP\lucene-4bf302dec76f27bff81fc3dd3118abbb-write.lock
	at org.apache.lucene.store.Lock.obtain(Lock.java:58)
	at
org.apache.lucene.index.IndexReader.aquireWriteLock(IndexReader.java:408)
	at org.apache.lucene.index.IndexReader.delete(IndexReader.java:432)
	at org.apache.lucene.index.IndexReader.delete(IndexReader.java:454)

ANyone know the cause of this?

Steve Rajavuori
O'Pin Systems
2600 Eagan Woods Dr., Suite 400
Eagan, MN  55121
651-994-6556
stever@opin.com 

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


Re: Lock file problem

Posted by Luis Muniz <lu...@b2boost.com>.
Are you already using an IndexWriter?
IndexWriter creates a lock i think. And IndexReader.delete wants to 
abtain a a lock also.
you have to perform your deletes before you use the indexWriter to add 
documents to the index.

I hope this helps

Steve Rajavuori wrote:

>I'm having a problem with Lucene obtaining a lock file on Windows. Running
>1.4 RC3, I see the error below repeatedly. I try stopping my process,
>deleting the file, then restarting. The error just occurs again every time.
>
>java.io.IOException: Lock obtain timed out:
>Lock@C:\WINNT\TEMP\lucene-4bf302dec76f27bff81fc3dd3118abbb-write.lock
>	at org.apache.lucene.store.Lock.obtain(Lock.java:58)
>	at
>org.apache.lucene.index.IndexReader.aquireWriteLock(IndexReader.java:408)
>	at org.apache.lucene.index.IndexReader.delete(IndexReader.java:432)
>	at org.apache.lucene.index.IndexReader.delete(IndexReader.java:454)
>
>ANyone know the cause of this?
>
>Steve Rajavuori
>O'Pin Systems
>2600 Eagan Woods Dr., Suite 400
>Eagan, MN  55121
>651-994-6556
>stever@opin.com 
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>  
>

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