首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >Grails -访问org.hibernate.cfg.Environment是禁止的错误

Grails -访问org.hibernate.cfg.Environment是禁止的错误
EN

Stack Overflow用户
提问于 2016-02-03 15:46:03
回答 1查看 180关注 0票数 0

环境

代码语言:javascript
复制
Grails 2.4.4
PostgreSQL 9.4
JDK 1.7

我想让Grails Database Reverse Engineer Plugin开始工作。我经历了一些错误,现在我被这些错误困住了。我是个新手,对hibernate不太熟悉。我能做些什么来纠正这些错误?我试图添加hibernate.properties文件,但这不起作用。(我不确定我做得对.)

代码语言:javascript
复制
/Grails_Workspace/dbTest/target/work/plugins/db-reverse-engineer-4.0.0/src/groovy/grails/plugin/reveng/Reenigne.groovy: 92: Access to org.hibernate.cfg.Environment#DRIVER is forbidden @ line 92, column 14.
        properties[Environment.DRIVER] = driverClass
.               ^
.    
Access to org.hibernate.cfg.Environment#PASS is forbidden @ line 93, column 14.
        properties[Environment.PASS] = password
.               ^
.    
Access to org.hibernate.cfg.Environment#URL is forbidden @ line 94, column 14.
        properties[Environment.URL] = url
.               ^
.    
Access to org.hibernate.cfg.Environment#USER is forbidden @ line 95, column 14.
        properties[Environment.USER] = username
.               ^
.    
Access to org.hibernate.cfg.Environment#DIALECT is forbidden @ line 97, column 15.
            properties[Environment.DIALECT] = dialect
.                ^
.    
Access to org.hibernate.cfg.Environment#DEFAULT_SCHEMA is forbidden @ line 100, column 15.
            properties[Environment.DEFAULT_SCHEMA] = defaultSchema
.                ^
.    
Access to org.hibernate.cfg.Environment#DEFAULT_CATALOG is forbidden @ line 103, column 15.
            properties[Environment.DEFAULT_CATALOG] = defaultCatalog
                 ^

谢谢你的帮助。

编辑

插件块

代码语言:javascript
复制
plugins {
    // plugins for the build system only
    build ":tomcat:7.0.55"

    // plugins for the compile step
    compile ":scaffolding:2.1.2"
    compile ":asset-pipeline:1.9.9"
    compile ":postgresql-extensions:4.6.1"
    compile ":joda-time:1.5"
    compile ":db-reverse-engineer:4.0.0"

    // plugins needed at runtime but not for compilation
    runtime ":hibernate4:4.3.6.1" // or ":hibernate:3.6.10.18"
    runtime ":database-migration:1.4.0"
    runtime ":jquery:1.11.1"

    // Uncomment these to enable additional asset-pipeline capabilities
    //compile ":sass-asset-pipeline:1.9.0"
    //compile ":less-asset-pipeline:1.10.0"
    //compile ":coffee-asset-pipeline:1.8.0"
    //compile ":handlebars-asset-pipeline:1.3.0.3"
}
EN

回答 1

Stack Overflow用户

发布于 2016-03-16 09:37:16

也有同样的问题。我用了3.0.0

使用

代码语言:javascript
复制
compile ":db-reverse-engineer:3.0.0"
remove 
runtime ":db-reverse-engineer:4.0.0"
票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/35181465

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档