We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Seems there is an issue with logging due to a "Column 'date_created' cannot be null" and MySQL
Using: grailsVersion=3.3.9 gormVersion=6.1.11.RELEASE audit-logging:3.0.4 name: 'mysql-connector-java', version: '5.1.47'
into audit_log (persisted_object_id, property_name, date_created, last_updated, event_name, actor, new_value, class_name, old_value, persisted_object_version, uri) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) Hibernate: insert into audit_log (persisted_object_id, property_name, date_created, last_updated, event_name, actor, new_value, class_name, old_value, persisted_object_version, uri) values (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) ... 2019-08-16 10:54:50.502 TRACE --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicBinder : binding parameter [3] as [TIMESTAMP] - [null] 2019-08-16 10:54:50.502 TRACE --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicBinder : binding parameter [3] as [TIMESTAMP] - [null] 2019-08-16 10:54:50.502 TRACE --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicBinder : binding parameter [4] as [TIMESTAMP] - [null] 2019-08-16 10:54:50.502 TRACE --- [nio-8080-exec-3] o.h.type.descriptor.sql.BasicBinder : binding parameter [4] as [TIMESTAMP] - [null] ... 2019-08-16 10:54:50.523 ERROR --- [nio-8080-exec-3] o.h.engine.jdbc.spi.SqlExceptionHelper : Column 'date_created' cannot be null 2019-08-16 10:54:50.537 ERROR --- [nio-8080-exec-3] g.p.orm.auditable.AuditLogListener : Error creating audit log for event PostInsert and domain anyDomain : 3```
The text was updated successfully, but these errors were encountered:
Same for newer versions of mysql-connector (tested with mysql-connector-java', version: '8.0.17')
Sorry, something went wrong.
How does your AuditTrail class look like? Autotimestamp is normally on. There is a fallback in the listener to create the actual dateCreated. See https://github.com/robertoschwald/grails-audit-logging-plugin/blob/master/plugin/src/main/groovy/grails/plugins/orm/auditable/AuditLogListener.groovy#L192
I have had the same problem with the default AuditTrail class created by grails audit-quickstart.
AuditTrail
grails audit-quickstart
After removing autoTimestamp false from mapping closure, everything works fine.
autoTimestamp false
No branches or pull requests
Seems there is an issue with logging due to a "Column 'date_created' cannot be null" and MySQL
Using:
grailsVersion=3.3.9
gormVersion=6.1.11.RELEASE
audit-logging:3.0.4
name: 'mysql-connector-java', version: '5.1.47'
The text was updated successfully, but these errors were encountered: