Whenever I try to upload a single image I get the error message below: IOException whilst creating index writer cause-> org.apache.lucene.store.LockObtainFailedException:

If you see this error message when attempting to upload or search for an image:

IOException whilst creating index writer cause-> org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: SimpleFSLock@C:\Tomcat\webapps\asset-bank\index\write.lock at org.apache.lucene.store.Lock.obtain(Lock.java:70) at org.apache.lucene.index.IndexWriter.init(IndexWriter.java:598) at org.apache.lucene.index.IndexWriter.(IndexWriter.java:410) at org.apache.lucene.index.IndexModifier.init(IndexModifier.java:174) at org.apache.lucene.index.IndexModifier.(IndexModifier.java:141)

This is due to tomcat restarting halfway through an index and the index is locked. Try the following to resolve...

- Stop tomcat
- Delete the file [tomcat]\webapps\asset-bank\index\write.lock or any files [tomcat]\temp\lucene-***
- Start tomcat
- Reindex the images (from the Admin > attributes page - wait for the message saying it completed).
- Try the upload or search again.


Was this article helpful?

Yes No

Thanks for your feedback!