2

We have a Seam 2 application running on JBoss AS 7. In order to speed up access to historical revisions of entities, we switched to the Envers Validity Audit Strategy. Everything seemed ok, but then saving one particular type of entity would cause a

org.hibernate.AssertionFailure: possible nonthreadsafe access to session

error. Turning off the Validity Audit Strategy fixed the problem.

Has anyone had any success with the Validity Audit Strategy (the docs do say that it is experimental)?

I should point out we are using Hibernate 3.6.8.Final.

Phyxx
  • 15,730
  • 13
  • 73
  • 112
  • Hibernate 3.6.10 displays the same problems. – Phyxx May 21 '12 at 04:31
  • After some research this problem boils down to removing an entity from a collection. The "possible nonthreadsafe access to session" error actually has nothing to do with threads. http://www.liferay.com/it/community/forums/-/message_boards/message/8288022 seems to document a similar kind of issue. – Phyxx May 21 '12 at 06:47
  • Actually the bug occurs when an entity with any kind of collection has items added or removed from that collection. – Phyxx May 21 '12 at 20:44

1 Answers1

0

I think the issue is to do with the FlushMode. See https://hibernate.onjira.com/browse/HHH-7329?focusedCommentId=46833#comment-46833 for an explanation of how to fix this issue.

Phyxx
  • 15,730
  • 13
  • 73
  • 112