Steve, Locking in Lucene has changed since version 1.2. In that version lock files were stored in the index directory, while in the version you are using now they are stored in the system's temporary directory by default. Furthermore, their names have changed. Therefore, make sure that your temporary directory is writable by the user who is running your Lucene application. I use Lucene on Linux, so I do this when I get locking errors like yours:
prompt> ls -al /tmp | grep -i lucene If the found file looks stale, I manually remove it (rm ...). You can also programmatically force unlocking of an index, if you want. Finally, there is a Wiki page showing how you can change the directory to store lock files, using system properties. This can be handy if your temp directory is not writable or some such. Otis --- Steve Rajavuori <[EMAIL PROTECTED]> wrote: > I am seeing the following error when trying to open IndexWriter. I am > now > using Lucene 1.4-RC3, but I was previously using 1.2 to create this > index. > Any suggestions of how to fix this problem? > > java.io.IOException: Lock obtain timed out > at org.apache.lucene.store.Lock.obtain(Lock.java:58) > at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:216) > at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:172) > > > Steve Rajavuori > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
