Grails 2.4 + Hibernate 4 + Searchable plugin = ClassNotFoundException: org.hibernate.impl.SessionFactoryImpl

前端 未结 2 1277
情歌与酒
情歌与酒 2021-02-06 08:28

Recently I was integrating a simple Grails application with the Searchable plugin. What I\'ve found was that Searchable plugin does not work with Hibernate 4 library.

He

2条回答
  •  臣服心动
    2021-02-06 09:14

    Burt gave very good description. Thanks for this.

    I just want to add short hint. At this time Searchable plugin doesn't work with Hibernate 4.X.X. Try to downgrade your hibernate in the project to 3.X.X (hibernate:3.6.10.18)

    So you will need: in DataSource.groovy

    add/uncomment the following:

    cache.region.factory_class = 'net.sf.ehcache.hibernate.EhCacheRegionFactory'

    and delete/comment:

    cache.region.factory_class = 'org.hibernate.cache.ehcache.EhCacheRegionFactory'

    in BuildConfig.groovy:

    change Hibernate dependency to ":hibernate:3.6.10.18"

    It works on my machine with such changes.

    Hope it will help to somebody.

    (I've found the answer here http://tiku.io/questions/4052527/does-the-searchable-plugin-work-with-grails-2-0-0-i-argue-no

提交回复
热议问题