Skip to content

Column 'date_created' cannot be null #192

@abrahaj

Description

@abrahaj

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```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions