简体   繁体   中英

Can't find configured AuditLog domain error while configuring Auditlog plugin for Grails 2.4.4

I am trying to add the auditlog plugin but when server stars I get the error Cant find configured Auditlog domain and the server shuts down.

[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: 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 at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: 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

And this is how I added in the my buildconfig.groovy

plugins {
    // plugins for the build system only
    build ":tomcat:7.0.55"
    compile ":audit-logging:1.1.0-SNAPSHOT"

As described in the docs ( http://plugins.grails.org/plugin/audit-logging ), you must perform

grails audit-quickstart your.package.YourAuditLogEvent>

to create the audit-log Domain class in your project and to configure this class in Config.groovy.

BTW: 1.1.0 is released, already.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM