Reputation: 2581
I've deployed my app to tomcat running on EC2 via Cloud Foundry. The application uses the Grails Audit Logging Plugin
I'm getting the following runtime error:
Error 500: Executing action [save] of controller [com.questern.aoms.CompanyController] caused exception: groovy.lang.MissingPropertyException: No such property: errors for class: org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEvent
Servlet: grails
URI: /aoms/grails/company/save.dispatch
Exception Message: No such property: errors for class: org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEvent
Caused by: No such property: errors for class: org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEvent
Class: CompanyController
At Line: [30]
The exception is:
groovy.lang.MissingPropertyException: No such property: errors for class: org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEvent
at $Proxy10.saveOrUpdate(Unknown Source)
at com.questern.aoms.CompanyController$_closure4.doCall(CompanyController.groovy:30)
at com.questern.aoms.CompanyController$_closure4.doCall(CompanyController.groovy)
I have added the import statement to the controller CompanyController, but to no avail.
import org.codehaus.groovy.grails.plugins.orm.auditable.AuditLogEvent
I checked the war file and the AuditLogEvent is include in:
aoms-0.1.war\WEB-INF\classes\org\codehaus\groovy\grails\plugins\orm\auditable\
Any suggestions as to what the problem could be?
Upvotes: 0
Views: 1372
Reputation: 1601
It looks to me that maybe your deployment is corrupt. Try exiting all IDE's then run
grails clean
then
grails war
or what ever the option to create and deploy.
Sometimes I had found that using STS (Eclipse and the Grails Plugin) the war fails (as you mentioned above)
Hope this helps.
Upvotes: 1
Reputation: 4257
AuditLogEvent is a domain class that is included within the audit logging plugin.
You shouldn't need to directly create an instance of this class to get the logging features of the plugin. Let the plugin do the work for you by setting the following field in the domain objects you wish to audit.
static auditable = true
It looks to me like you might be trying to create and save an instance of the domain class yourself?
I have added the import statement to the controller CompanyController, but to no avail.
If the domain object you are wanting to audit is "Company" then try just adding the "auditable" field described above and remove all direct references in your project to "AuditLogEvent".
Upvotes: 0