S2SH+Hibernate search出现的问题

一   java.lang.NoSuchMethodError: org.hibernate.engine.transaction.spi.TransactionEnvironment.getJtaPlatform()Lorg/hibernate/service/jta/platform/spi/JtaPlatform

相信大家遇到这个问题一定是累觉不爱了吧,呵呵。本人qq1413557667

出现这个问题的原因是不同版本的(例如4.2跟4.5)的hibernate-core jar包里面In Hibernate 4.2 method TransactionEnvironment.getJtaPlatform() returns返回的值不一样,所以你就得不到值了,说的好模糊,反正你按照hibernate search的包里面的jar包来导就没错了,还要做项目,先这样吧,最后附上我得到启发的网址http://stackoverflow.com/questions/22204255/hibernate-search-nosuchmethod-org-hibernate-engine-transaction-spi-transaction
二  Couldn't open the IndexWriter because of previous error: operation skipped, index ouf of sync  、、Reindexed 16 entities
原因是因为我在tomcat写入,再从test里面取出,这样操作是不可以的,索引库会自动上锁。
解决之道:把tomcat停了。
  
原文地址:https://www.cnblogs.com/superYou/p/4077160.html