[
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-540?pag...
]
j nadler commented on HSEARCH-540:
----------------------------------
Interesting: Tom said that the problem went away with an explicit flush. I was trying to
use hibernate.transaction.flush_before_completion=true, but I notice that
Ejb3Configuration clobbers that setting with a message like
"flush_before_completion=true ignored in HEM"
With hibernate debug logging enabled, it appears that no flush is happening before commit
in my configuration. In a 'standalone JTA' environment (Tomcat, Hibernate as a
JPA provider, Spring manages JTA transactions using either JOTM or Atomikos, both give the
same result) how should the flush-before-commit happen? In my case at least, this seems
to be at the root of the problem. I'd like to turn flush_before_completion on, but
Ejb3Configuration won't let me.
That leads me to believe that the Hibernate Entity Manager authors expected the automatic
flush before commit to happen in some other way. From my experience, in this particular
stack there is no way to make it happen.
I bet if I switched to pure hibernate (ditch the JPA, keep everything else, leaving
Tomcat, Hibernate, Spring, JOTM) that it would work fine because I could then turn on
flush_before_completion. Ditching JPA is not the right solution, of course.
JTA transaction commit causes AssertionFailure: Access a Sealed
WorkQueue which has not been sealed
---------------------------------------------------------------------------------------------------
Key: HSEARCH-540
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HSEARCH-540
Project: Hibernate Search
Issue Type: Bug
Affects Versions: 3.2.0.Final
Environment: Hibernate 3.5.2-Final, Spring 3.0.2.RELEASE, MySQL 5.1.34, Atomikos
3.5.13
Reporter: Tom Waterhouse
Attachments: hibernate-search-jta-bug.log, jta-btm.zip
When we switched our application to use JTA a number of exceptions are generated on
transaction commit. Spring is used by the application; the transactions are managed via
the Spring class JtaTransactionManager. The Web app and Hibernate Search worked perfectly
using JpaTransactionManager.
Exception examples:
[2010-06-04 09:04:34.391, 49026]ERROR[http-8080-1](AssertionFailure.java:46) - an
assertion failure occured (this may indicate a bug in Hibernate)
org.hibernate.annotations.common.AssertionFailure: Access a Sealed WorkQueue which has
not been sealed
[2010-06-04 09:04:34.395, 49030]ERROR[http-8080-1](AssertionFailure.java:50) - an
assertion failure occured (this may indicate a bug in Hibernate, but is more likely due to
unsafe use of the session)
org.hibernate.HibernateException: Error while indexing in Hibernate Search (ater
transaction completion)
The full log file has been attached
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira