Hi, Try deleting the write.lock file or calling the static method IndexWriter.Unlock(directory);
I guess it is due to process crash and therefore the index was not unlocked. :-) Anders Lybecker On Thu, Oct 15, 2009 at 3:15 PM, Tim Haughton <timhaugh...@gmail.com> wrote: > I'm getting this all of a sudden when adding a new document: > > Lucene.Net.Store.LockObtainFailedException: Lock obtain timed out: > simplefsl...@c:\Users\timhaughton\HDM AppData > Test\MetaDataIndex\write.lock > at Lucene.Net.Store.Lock.Obtain(Int64 lockWaitTimeout) in > > C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Store\Lock.cs:line > 107 > at Lucene.Net.Index.IndexWriter.Init(Directory d, Analyzer a, Boolean > create, Boolean closeDir, IndexDeletionPolicy deletionPolicy, Boolean > autoCommit) in > > C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexWriter.cs:line > 739 > at Lucene.Net.Index.IndexWriter..ctor(FileInfo path, Analyzer a, Boolean > create) in > > C:\Users\timhaughton\Desktop\Lucene\Lucene.Net_2_3_2\src\Lucene.Net\Index\IndexWriter.cs:line > 480 > at HDM.EDMDocument.AddToMetaIndex(Folder folder) in > C:\Users\timhaughton\svn\HDM\src\Application\EDMDocument.cs:line 253 > > > I am half suspecting that this has something to do with the AVG free virus > scanner that I use on my dev machine (unfortunately it's harder to kill > than > the hardiest virus). I haven't seen this in the field (touches wooden > rabbit's foot). > > Anyone else seen this? I've had a few instances of various file access > errors. > > Regards, > > Tim Haughton > www.agilemicroisv.com > Chat Skype: timhaughton > Contact Me [image: Linkedin] <http://www.linkedin.com/in/timhaughton > >[image: > Facebook] <http://www.facebook.com/timhaughton>[image: > Twitter]<http://www.twitter.com/dokix> > Blog RSS SSL and Code Signing for the Micro > ISV< > http://feedproxy.google.com/%7Er/TheAgileMicroISVBlog/%7E3/2D_3kpNagDs/> >