lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Philip Brown <>
Subject Lock error attempting update of RAMDirectory index
Date Thu, 31 Aug 2006 22:24:00 GMT

I'm getting the following error trying to instantiate an IndexModifier on a
RAMDirectory index: Lock obtain timed out:$1@a336b7
	at Code))
	at org.apache.lucene.index.IndexWriter.<init>(
	at org.apache.lucene.index.IndexWriter.<init>(
	at org.apache.lucene.index.IndexModifier.init(
	at org.apache.lucene.index.IndexModifier.<init>(

Here's some background:

I have a web application where, upon startup, this RAMDirectory is created
and loaded with a set of values from 2 databases.  When a user makes a call
to do a delete or add of data, it should update not only the database
(obviously) but also the RAMDirectory index, such that the 2 are always in
sync with one another.  

It was my thought to have a static class which calls an update method on
itself every X number of minutes to recreate/reload the RAMDirectory index
from the database -- this in addition to the simultaneous updates to
RAMDirectory (removal of documents and adding of documents) and database to
keep the data in sync.  Then, I should be able to just use searching
capabilities that Lucene offers to get the data requested by the user,
rather than issuing tons of select queries to the databases.  

What is causing this error, and how do I fix?  What would be a good approach
for achieving the goal of database and index synchronization?

Thanks in advance,

View this message in context:
Sent from the Lucene - Java Users forum at

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message