Symptom:
You have configured for the org. hibernate. envers. strategy. ValidityAuditStrategy with your Hibernate Envers to audit trail SQL table records with the following exception;
Root Cause:
This happens when the table that already has records and you add the Envers auditing with ValidateAuditStrategy "after the fact". In other words, there are legacy records which were not originally audited.Basically, the ValidityAuditStrategy was designed only with the assumption that you started using it from completely no data in the table and its related tables. It requires the initial INSERT record of the very first record of all rows with a unique record ID.
This issue has been logged in the Hibernate JIRA HHH-8456
Workarounds:
If you can afford to disable the ValidyAuditStrategy, that will log the entries.
This problem may be worked around by using the following tool that's available from the GitHub.
https://github.com/hydra1983/hibernate-envers-tools