-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: Hibernate Search: OverlappingFileLockException
PostPosted: Tue Feb 05, 2013 8:02 am 
Newbie

Joined: Tue Feb 05, 2013 7:47 am
Posts: 1
Hi,

I want to start the initial indexing in Hibernate Search. When I execute this code from the hibernatedocs for the first time:
Code:
        Session session = HibernateUtil.getSession();
        try
        {
            FullTextSession fullTextSession = Search.getFullTextSession(session);
            fullTextSession.createIndexer().startAndWait();

        } catch (InterruptedException e)
        {
            e.printStackTrace();
        }


It works. But when I want to reinititializing the index, hibernate give me the following stacktrace:
Quote:
12:38:09,561 ERROR [org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask] (Hibernate Search: Index updates queue processor for index data.facts.Fact-1) HSEARCH
000073: Error in backend: java.nio.channels.OverlappingFileLockException
at sun.nio.ch.FileChannelImpl$SharedFileLockTable.checkList(FileChannelImpl.java:1176) [rt.jar:1.6.0_20]
at sun.nio.ch.FileChannelImpl$SharedFileLockTable.add(FileChannelImpl.java:1078) [rt.jar:1.6.0_20]
at sun.nio.ch.FileChannelImpl.tryLock(FileChannelImpl.java:878) [rt.jar:1.6.0_20]
at java.nio.channels.FileChannel.tryLock(FileChannel.java:962) [rt.jar:1.6.0_20]
at org.apache.lucene.store.NativeFSLock.obtain(NativeFSLockFactory.java:217) [lucene-core-3.6.2.jar:3.6.2 1423725 - rmuir - 2012-12-18 19:45:40]
at org.apache.lucene.store.Lock.obtain(Lock.java:72) [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:148) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Fina
l]
at org.hibernate.search.backend.impl.lucene.IndexWriterHolder.getIndexWriter(IndexWriterHolder.java:115) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]
at org.hibernate.search.backend.impl.lucene.AbstractWorkspaceImpl.getIndexWriter(AbstractWorkspaceImpl.java:117) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Fi
nal]
at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.applyUpdates(LuceneBackendQueueTask.java:100) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Fi
nal]
at org.hibernate.search.backend.impl.lucene.LuceneBackendQueueTask.run(LuceneBackendQueueTask.java:67) [hibernate-search-engine-4.2.0.Final.jar:4.2.0.Final]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442) [rt.jar:1.6.0_20]
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) [rt.jar:1.6.0_20]
at java.util.concurrent.FutureTask.run(FutureTask.java:139) [rt.jar:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [rt.jar:1.6.0_20]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909) [rt.jar:1.6.0_20]
at java.lang.Thread.run(Thread.java:619) [rt.jar:1.6.0_20]


When I stop the JBoss, delete the indexfiles, I can reinit the index, but only at once. The second try give this stracktrace again.

hibernate.cfg.xml:
Quote:
<property name="hibernate.search.default.directory_provider">filesystem</property>
<property name="hibernate.search.default.indexBase">C:/Programme/jboss-as-7.1.1.Final/standalone/deployments</property>


I think, the reason is the indexlock. How can I unlock the index on runtime? I'd like unlock, rebuild and relock the index in one step.

Thank You!


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.