envers和hibernate插件不兼容

时间:2014-08-19 11:05:55

标签: grails gorm grails-2.0 grails-plugin

我正在使用hibernate插件并尝试将envers插件集成到我的项目中。但是出现以下问题: 当我试图开始项目时,它给了我一个例外:

  [groovyc] org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
  [groovyc] General error during conversion: java.lang.NoClassDefFoundError: org/hibernate/event/PostInsertEventListener

我的构建配置如下:

{
    plugins {
        // plugins for the build system only
        build ":tomcat:7.0.54"

        // plugins for the compile step
        compile ":scaffolding:2.1.2"
        compile ':cache:1.1.7'
        compile ":asset-pipeline:1.8.11"
        compile ":spring-security-ui:1.0-RC2"
        // plugins needed at runtime but not for compilation
        runtime ":hibernate4:4.3.5.4" // or ":hibernate:3.6.10.16"
        runtime ":envers:2.1.0"
        runtime ":database-migration:1.4.0"
        runtime ":jquery:1.11.1"

}

我试图找到PostInsertEventListener类,但我在org.hibernate.event.spi下的不同包中找到了它,并且出于某种原因,它试图在org/hibernate/event下找到它。是一些插件不兼容的问题?谢谢!

1 个答案:

答案 0 :(得分:2)

运行grails dependency-report以查看冲突

您还可以尝试使用hib4替换hib3插件。这应该最有可能导致编译错误