1 Reply Latest reply on Aug 29, 2014 4:13 AM by Sanne Grinovero

    lucene index problem: Lock obtain timed out

    Francesco Sclano Newbie

      Hi,

      I developed a custom treecache and I'm currently using 5 distinct caches all storing pairs of the same type: (String, CacheNode<T extends CacheDTO>).

      CacheNode is a wrapper for DTO used in my project, so CacheNode has a property of type T. CacheDTO is the superclass for every DTO used in my project.

      I have to index CacheDTO wrapped in CacheNode, but I got the error reported below.

      I think the error is due to the fact that I use the same index for 5 distinct caches since the wrapper CacheNode is the same for every caches, even if CacheDTO is a different type for every cache.

      How can I use a different index for every cache even if I use the same CacheNode class as value?

       

      22:40:17,802 ERROR [org.hibernate.search.exception.impl.LogErrorHandler] (Hibernate Search: Index updates queue processor for index com.......CacheNode-1) HSEARCH000058: Exception occurred org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/.....CacheNode/write.lock

      Primary Failure:

              Entity com.....CacheNode  Id S:BOGroup#370  Work Type  org.hibernate.search.backend.UpdateLuceneWork

      : org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/......CacheNode/write.lock

              at org.apache.lucene.store.Lock.obtain(Lock.java:84) [lucene-core-3.6.2.jar:3.6.2 1423725 - rmuir - 2012-12-18 19:45:40]

              at org.apache.lucene.index.IndexWriter.<init>(IndexWriter.java:1098) [lucene-core-3.6.2.jar:3.6.2 1423725 - rmuir - 2012-12-18 19:45:40]

              at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.createNewIndexWriter(IndexWriterHolder.java:146) [hibernate-search-engine-4.4.0.Final.jar:4.4.0.Final]

              at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.getIndexWriter(IndexWriterHolder.java:113) [hibernate-search-engine-4.4.0.Final.jar:4.4.0.Final]

              at org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.getIndexWriter(AbstractWorkspaceImpl.java:117) [hibernate-search-engine-4.4.0.Final.jar:4.4.0.Final]

              at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:101) [hibernate-search-engine-4.4.0.Final.jar:4.4.0.Final]

              at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:67) [hibernate-search-engine-4.4.0.Final.jar:4.4.0.Final]

              at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [rt.jar:1.7.0_10]

              at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [rt.jar:1.7.0_10]

              at java.util.concurrent.FutureTask.run(FutureTask.java:166) [rt.jar:1.7.0_10]

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_10]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_10]

              at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_10]