【问题标题】:envers and hibernate plugins incompatibilityenvers 和 hibernate 插件不兼容
【发布时间】:2014-08-19 11:05:54
【问题描述】:

我正在使用 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 下找到它。是不是一些插件不兼容的问题?谢谢!

【问题讨论】:

    标签: grails grails-orm grails-2.0 grails-plugin


    【解决方案1】:

    运行 grails dependency-report 以查看冲突

    您也可以尝试将hib4 插件替换为hib3。这很可能是导致编译错误的原因

    【讨论】:

    • 我试过了,envers似乎不支持hib4
    • 这样你就有了解决方案
    猜你喜欢
    • 2014-05-08
    • 1970-01-01
    • 2011-09-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2011-03-28
    • 2020-07-23
    • 1970-01-01
    相关资源
    最近更新 更多