[英]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.