Hibernate 搜索 NoSuchMethodError
只是简单地看看是否有人遇到过类似的问题?
我已检查是否正在使用项目设置中所需的依赖项,但当我尝试使用 createIndexer() 时收到此错误:
java.lang.NoSuchMethodError: org.hibernate.Session.setDefaultReadOnly(Z)V 在 org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:92) 在 org.hibernate.search.batchindexing.OptionallyWrapInJTATransaction.run(OptionallyWrapInJTATransaction.java:107) 在 java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) 在 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) 在 java.lang.Thread.run(Thread.java:619)
干杯, 抢
Just a quick line to see if anyone has had a similar problem to this?
I have checked that I am using the dependencies that are required in the project setup but am getting this error when I try to use createIndexer():
java.lang.NoSuchMethodError:
org.hibernate.Session.setDefaultReadOnly(Z)V
at
org.hibernate.search.batchindexing.EntityConsumerLuceneworkProducer.run(EntityConsumerLuceneworkProducer.java:92)
at
org.hibernate.search.batchindexing.OptionallyWrapInJTATransaction.run(OptionallyWrapInJTATransaction.java:107)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at
java.lang.Thread.run(Thread.java:619)
Cheers,
rob
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
Session.setDefaultReadOnly()
是在 Hibernate 3.5 中添加的。也许您的 Hibernate Search 版本与您的 Hibernate 版本不兼容。请参阅 Hibernate 兼容性矩阵。
Session.setDefaultReadOnly()
was added in Hibernate 3.5. Perhaps your version of Hibernate Search is not compatible with your version of Hibernate.See Hibernate Compatibility Matrix.