I ran into the same problem and had to come up with some workaround because in our project "global_with_modified_flag" is a key feature.
The workaround is very simple. However, i dont really know wether it works as originally intended or not, at least it doesn't break hibernate.
The root of the probem is when envers try to audit a removed entity, it compares all properties, and if an uninitialized collection is encountered, the isEmpty() method gets called on it, which in turn tries to load it's size, but it cannot do that because the collection is no longer associated with a session (due to remove).
My solution is that if the REV_TYPE is DEL, the method that decides that the collection was modified always returns true.
I attached the modified source tree and also created a patch.
Please note that i'm not a contributor and do not really know how things are going on here, but i thought somebody may find these files useful.
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
I ran into the same problem and had to come up with some workaround because in our project "global_with_modified_flag" is a key feature.
The workaround is very simple. However, i dont really know wether it works as originally intended or not, at least it doesn't break hibernate.
The root of the probem is when envers try to audit a removed entity, it compares all properties, and if an uninitialized collection is encountered, the isEmpty() method gets called on it, which in turn tries to load it's size, but it cannot do that because the collection is no longer associated with a session (due to remove).
My solution is that if the REV_TYPE is DEL, the method that decides that the collection was modified always returns true.
I attached the modified source tree and also created a patch.
Please note that i'm not a contributor and do not really know how things are going on here, but i thought somebody may find these files useful.