简体   繁体   English

休眠搜索:由另一个程序持有的锁:var / lucene / indexes / com.org.Recipe / write.lock

[英]Hibernate Search: Lock held by another program: var/lucene/indexes/com.org.Recipe/write.lock

I am using hibernate search 5.5.4, while adding new record to the database this Exception occurred and the data is successfully inserted to database but the index was not created 我正在使用休眠搜索5.5.4,同时将新记录添加到数据库时发生此异常,并且数据已成功插入数据库,但未创建索引

Exception occurred org.apache.lucene.store.LockObtainFailedException: Lock held by another program: var/lucene/indexes/com.org.Recipe/write.lock 发生异常org.apache.lucene.store.LockObtainFailedException:另一个程序持有的锁:var / lucene / indexes / com.org.Recipe / write.lock

是的,它解决了,问题是我试图将session.save()更改为session.persist()来持久化数据,但问题消失了,索引值只能在persist,update,delete等位置更新。

That literally means what the error is saying: there is another process still running which is "owning" the lock on the index. 从字面上看,这意味着错误在说什么:还有一个仍在运行的进程正在“拥有”索引锁。

That is very likely another instance of Hibernate Search; 这很可能是Hibernate Search的另一个实例。 for example this happens if you started your application before, and didn't shut it down. 例如,如果您之前启动过应用程序而没有关闭它,则会发生这种情况。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 锁定获取超时错误:NativeFSLock @ C:\\ lucene \\ indexes \\ com.srccodes.example.hibernate.Contact \\ write.lock - Lock obtain timed out error : NativeFSLock@C:\lucene\indexes\com.srccodes.example.hibernate.Contact\write.lock 休眠搜索中write.lock错误 - Error in write.lock in hibernate search org.apache.lucene.store.LockObtainFailedException:锁定获取超时:NativeFSLock@/var/database/schema/label/lucene/write.lock - org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: NativeFSLock@/var/database/schema/label/lucene/write.lock Lucene / Hibernate搜索锁定异常 - Lucene / Hibernate Search Lock Exception JVM崩溃后如何清除Lucene write.lock文件的锁定? - How to clear the lock for lucene write.lock file after a jvm crash? 检查锁是否被持有但如果它是空闲的则不锁定它 - Check if lock is held but not lock it if it is free 如果没有运行拥有该锁的JVM,那么为Solr删除write.lock文件时,可能会丢失数据(如果有)的可能性 - What is the potential for data loss (if any) when deleting a write.lock file for Solr, providing that there are no JVM's running which own the lock org.apache.lucene.store.LockObtainFailedException:锁定获取超时: - org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out: notify/notifyall 是否释放持有的锁 - Does notify/notifyall release the lock being held Java和Hibernate,在更新/写入期间锁定对象,但始终允许读取 - Java and Hibernate, lock objects during update/write but reads always allowed
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM