Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/visual-studio-code/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Can';为Grails 2.4.4配置AuditLog插件时找不到配置的AuditLog域错误_Grails_Logging_Audit - Fatal编程技术网

Can';为Grails 2.4.4配置AuditLog插件时找不到配置的AuditLog域错误

Can';为Grails 2.4.4配置AuditLog插件时找不到配置的AuditLog域错误,grails,logging,audit,Grails,Logging,Audit,我正在尝试添加auditlog插件,但当服务器启动时,出现错误,无法找到已配置的auditlog域,服务器关闭 [ERROR] 2015-11-10 15:22:04,561 org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'org.codehaus.groovy

我正在尝试添加auditlog插件,但当服务器启动时,出现错误,无法找到已配置的auditlog域,服务器关闭

[ERROR] 2015-11-10 15:22:04,561        org.codehaus.groovy.grails.web.context.GrailsContextLoaderListener - Error initializing the application: Error creating bean with name 'org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Can't find configured AuditLog domain: groovy.util.ConfigObject@5bb5d623
org.springframework.beans.factory.BeanCreationException:创建名为“org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController”的bean时出错:bean实例化失败;嵌套异常为org.springframework.beans.beans实例化异常:未能实例化bean类[org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController]:构造函数引发异常;嵌套异常为java.lang.IllegalStateException:找不到配置的AuditLog域:groovy.util。ConfigObject@5bb5d623 在java.util.concurrent.FutureTask.run(FutureTask.java:262)处 位于java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) 位于java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) 运行(Thread.java:745) 原因:org.springframework.beans.beans实例化异常:无法实例化bean类[org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEventController]:构造函数引发异常;嵌套异常为java.lang.IllegalStateException:找不到配置的AuditLog域:groovy.util。ConfigObject@5bb5d623

这就是我如何在我的buildconfig.groovy中添加

plugins {
    // plugins for the build system only
    build ":tomcat:7.0.55"
    compile ":audit-logging:1.1.0-SNAPSHOT"
如文档()中所述,您必须执行


grails audit快速启动您的.package.YourAuditLogEvent>

在项目中创建审核日志域类,并在Config.groovy中配置此类


顺便说一句:1.1.0已经发布。

我没有相同的,
//由审计日志插件添加:auditDomainClassName='com.backface.AuditLog'
,但我仍然得到100%相同的错误。原因:java.lang.IllegalStateException:找不到配置的AuditLog域:groovy.util。ConfigObject@2b072e3c我仍然认为应用程序无法从Config.groovy中读取域文件名。请检查其格式是否与测试应用程序中的格式相似:plugins.grails.org上的文档中存在错误。正确的快速启动语法是:grails audit quickstart确保在grails app/domain中使用正确的包名创建域类。