You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lucenenet.apache.org by Jerome Chauvin <Je...@businessinteractif.fr> on 2007/02/28 14:20:25 UTC

Lucene 2.1: java.io.IOException: Lock obtain timed out: SimpleFSLock@

All,
 
We encounter issues while updating the lucene index, here is the stack trace:
 
Caused by: java.io.IOException: Lock obtain timed out:
SimpleFSLock@/data/www/orcanta/lucene/store1/write.lock
 at org.apache.lucene.store.Lock.obtain(Lock.java:69)
 at org.apache.lucene.index.IndexReader.aquireWriteLock(IndexReader.java:526)
 at org.apache.lucene.index.IndexReader.deleteDocument(IndexReader.java:551)
 at org.apache.lucene.index.IndexReader.deleteDocuments(IndexReader.java:578)
 at
com.bi.commerce.service.catalog.spring.lucene.LuceneIndex.deleteFromIndex(Luc
eneIndex.java:692)
 ... 25 more
 
 
Here is the source code of the lucene API invocation where the error occurs:
 
class com.bi.commerce.service.catalog.spring.lucene.LuceneIndex:
 
import org.apache.lucene.index.IndexReader;
...
 
    public synchronized void deleteFromIndex(ICatalogEntity entity) {
        if(!indexExists()) return;
        try {
            IndexReader reader = IndexReader.open(store);
            String uid = getUID(entity);
            try{
line 692=>      reader.deleteDocuments(new Term("uid",uid));
            }catch(ArrayIndexOutOfBoundsException e){
                //CHECK ignore this. Can happen if index has not been built
yet (??)
            }
            reader.close();
        } catch (IOException e) {
            throw new SearchEngineException(e);
        }catch(RuntimeException e){
            throw new SearchEngineException(e);
        }
    }
 
 
 
Do I something wrong? If somebody already encountered this error, or knows a
fix, I'm really interested!
 
Thanks in advance,
 
BRegards.
 
-Jerome Chauvin-
 
 

RE: Lucene 2.1: java.io.IOException: Lock obtain timed out: SimpleFSLock@

Posted by George Aroush <ge...@aroush.net>.
Hi Jerome,

I think you meant to post this on the Java Lucene mailing list -- this is
the C# Lucene.Net mailing list.

Regards,

-- George
 

-----Original Message-----
From: Jerome Chauvin [mailto:Jerome.Chauvin@businessinteractif.fr] 
Sent: Wednesday, February 28, 2007 8:20 AM
To: lucene-net-user@incubator.apache.org
Subject: Lucene 2.1: java.io.IOException: Lock obtain timed out:
SimpleFSLock@<path of index file>

All,
 
We encounter issues while updating the lucene index, here is the stack
trace:
 
Caused by: java.io.IOException: Lock obtain timed out:
SimpleFSLock@/data/www/orcanta/lucene/store1/write.lock
 at org.apache.lucene.store.Lock.obtain(Lock.java:69)
 at
org.apache.lucene.index.IndexReader.aquireWriteLock(IndexReader.java:526)
 at org.apache.lucene.index.IndexReader.deleteDocument(IndexReader.java:551)
 at
org.apache.lucene.index.IndexReader.deleteDocuments(IndexReader.java:578)
 at
com.bi.commerce.service.catalog.spring.lucene.LuceneIndex.deleteFromIndex(Lu
c
eneIndex.java:692)
 ... 25 more
 
 
Here is the source code of the lucene API invocation where the error occurs:
 
class com.bi.commerce.service.catalog.spring.lucene.LuceneIndex:
 
import org.apache.lucene.index.IndexReader;
...
 
    public synchronized void deleteFromIndex(ICatalogEntity entity) {
        if(!indexExists()) return;
        try {
            IndexReader reader = IndexReader.open(store);
            String uid = getUID(entity);
            try{
line 692=>      reader.deleteDocuments(new Term("uid",uid));
            }catch(ArrayIndexOutOfBoundsException e){
                //CHECK ignore this. Can happen if index has not been built
yet (??)
            }
            reader.close();
        } catch (IOException e) {
            throw new SearchEngineException(e);
        }catch(RuntimeException e){
            throw new SearchEngineException(e);
        }
    }
 
 
 
Do I something wrong? If somebody already encountered this error, or knows a
fix, I'm really interested!
 
Thanks in advance,
 
BRegards.
 
-Jerome Chauvin-