-
1. Re: Lists and @Unversioned
chris.simons Dec 30, 2008 4:02 PM (in response to chris.simons)Sorry, I forgot to post the cause:
2008-12-30 15:49:25,863 ERROR [org.hibernate.AssertionFailure] an assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to unsafe use of the session) org.hibernate.AssertionFailure: collection [com.bah.englink.ejb.da.AdminCategory.adminValues] was not processed by flush() at org.hibernate.engine.CollectionEntry.postFlush(CollectionEntry.java:205) at org.hibernate.event.def.AbstractFlushingEventListener.postFlush(AbstractFlushingEventListener.java:333)
-
2. Re: Lists and @Unversioned
adamw Dec 31, 2008 7:42 AM (in response to chris.simons)Hello,
well .. this stack trace fragment doesn't really contain any envers classes - only hibernate ones. Do you also get the error when not using Envers? (that is, when the listeners are not configured).
If that error shows up only when using Envers, then what is your exact mapping, database, how do you use Hibernate?
--
Adam -
3. Re: Lists and @Unversioned
chris.simons Dec 31, 2008 11:15 AM (in response to chris.simons)Hi Adam,
You're right...and the more I investigate the problem, the more I'm leaning on Hibernate.
So, the problem does not occur so long as I'm modifying data that was imported during deployment (in Seam, that would be import.sql). When I create/update the entity when it was manged by entityManager from the start, I do not have any problems.
I would like to just bring this to your attention; there seem to be a lot of buzz on the Hibernate forums about this problem in conjunction with using event listeners on post-update, post-create, and so forth. It seems it doesn't matter what the listener is (i.e. Envers is not the problem). This would further explain why Envers is not listed anywhere in the stack trace.
Please take a look at the following links when you have a moment. Thanks.
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763
http://forum.hibernate.org/viewtopic.php?p=2241484&sid=de4eb9046b3f44e7ddd23672cacb678b
http://opensource.atlassian.com/projects/hibernate/browse/HHH-443;jsessionid=auvVtgECwBLa6yRVn6
I still don't understand why some entities that are imported at deployment seem to be fine; I suspect it's some combination of the type of relationships/collections on my problem entities that is related to the issues/posts above. -
4. Re: Lists and @Unversioned
chris.simons Dec 31, 2008 11:16 AM (in response to chris.simons)Adam,
Please re-read my last post, keeping in mind that I *meant* to write that the problem ONLY OCCURS when I'm modifying data that was imported at deployment (import.sql).
The problem does NOT OCCUR when I'm working with data that was already inserted at some point by entityManager. -
5. Re: Lists and @Unversioned
chris.simons Jan 5, 2009 10:32 AM (in response to chris.simons)Adam,
When I remove Envers listeners from persistence.xml the issue is resolved. I no longer receive an assertion failure.
What do you suggest?
I am running Hibernate 3.2.6.GA.
Thanks. -
6. Re: Lists and @Unversioned
adamw Jan 6, 2009 2:23 AM (in response to chris.simons)Hello,
well, maybe it happens when any listener is installed.
Have you tried with Envers trunk and Hibernate 3.3?
Also, what's your exact configuration? (database, environment - spring, seam, standalone...?)
Adam -
7. Re: Lists and @Unversioned
chris.simons Jan 6, 2009 10:42 AM (in response to chris.simons)
Thanks for the reply.
I have not tried Envers trunk - are you referring to the preview release wherein Envers is part of Hibernate?
I've looked at upgrading to the latest release of Hibernate, but had some initial woes (SFLogger) so I reverted.
Here are some specifics that will hopefully help.
Problems exhibited in both environments...
Local:
HSQLDB embedded in JBoss 4.2.2.GA
Seam 2.1.1.SP1
Richfaces 3.2.2.GA
Envers 1.1.GA
Lab/Test:
Oracle 10.0.2 Database
JBoss 4.2.2.GA
Seam 2.1.1.SP1
Richfaces 3.2.2.GA
Envers 1.1.GA
Please be aware that the issue is most-related to data that is imported upon deployment (i.e. import.sql). That must mean something, right? -
8. Re: Lists and @Unversioned
adamw Jan 8, 2009 4:18 PM (in response to chris.simons)Hello,
yes, either the preview version or the SVN version. However it will work only with Hibernate 3.3. (It uses a new logging implementation, so that's probably why you had problems, but the switch requires quite small effort).
The issue is really strange - can you please create a JIRA bug? I tested Envers with Seam and HSqlDB so it in fact must be realted to the import. Maybe you could also create a testcase?
--
Adam -
9. Re: Lists and @Unversioned
eikehirsch Jan 13, 2009 4:44 AM (in response to chris.simons)"adamw" wrote:
well, maybe it happens when any listener is installed.
Looks like you were right. As Chris stated bug http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763 might be the problem. I don't know if there is need for another bug.
Anyway, there are comments about a workaround. Any change to integrate that in envers?
Regards,
Eike -
10. Re: Lists and @Unversioned
chris.simons Jan 13, 2009 9:33 AM (in response to chris.simons)Eike, you're absolutely right - this is our situation exactly.
And looks like 2763 has received some extra attention as of late; let's hope for a fix soon.
Thanks. -
11. Re: Lists and @Unversioned
eikehirsch Jan 13, 2009 10:40 AM (in response to chris.simons)Hi Chris,
have you found a way around this issue? I'm stuck at the moment :( -
12. Re: Lists and @Unversioned
eikehirsch Mar 6, 2009 3:42 AM (in response to chris.simons)Hi adam,
there was some action going on on:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32581#action_32581
Perhaps you could post an answer to Steves question? You are the one who knows best about what is going on in the listeners.
thanx
Eike -
13. Re: Lists and @Unversioned
eikehirsch Mar 6, 2009 3:43 AM (in response to chris.simons)can't edit my post. So again with proper link:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-2763?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=32581#action_32581 -
14. Re: Lists and @Unversioned
adamw Mar 19, 2009 3:37 AM (in response to chris.simons)Hello,
sorry for the delay - finally I got to read the thread :)
So the problem is with loading lazy collections in the event listeners? That in fact, logically, shouldn't happen - no need for Envers to load the collection, if it hasn't been modified.
Do you have some classes which demonstrate the problem? Maybe the bug is in Envers, not in Hibernte.
Adam