We successfully use Envers to audit changes to our data but have encountered an odd issue with our integration testing.
We are experimenting with using the Zonky embedded DB (Postgress) to allow test isolation. Our tests fail with:
org.springframework.orm.jpa.JpaSystemException: Negative revision numbers are not allowed
Everything works fine with a normal Postgres instance. I’m not sure if this is an issue with sequencers or a problem with Zonky and its approach to refreshing the DB state between tests.
If you can create a reproducer based on our test case template we can look into this, but it sounds to me like some issue with resetting sequences or the increment configuration of sequences.