[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3900?page=c...
]
Braam Wijsmuller commented on HHH-3900:
---------------------------------------
We're using JBoss Portal 2.7.2 with the default Hibernate libs (I believe it's
Hibernate 3.2.4), and we're experiencing the same Exceptions.
This might be related?
2009-06-16 04:44:05,724 ERROR [org.jboss.portal.identity.db.HibernateUserModuleImpl]
Cannot find user by name admin
org.hibernate.HibernateException: Unable to register cleanup Synchronization with
TransactionManager
at
org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:92)
at
org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
at
org.jboss.portal.identity.db.HibernateUserModuleImpl.getCurrentSession(HibernateUserModuleImpl.java:298)
at
org.jboss.portal.identity.db.HibernateUserModuleImpl.findUserByUserName(HibernateUserModuleImpl.java:90)
at
org.jboss.portal.identity.auth.IdentityLoginModule$1.run(IdentityLoginModule.java:239)
[etc...]
Do not attempt to register Synchronization when Transaction is in
STATUS_MARKED_ROLLBACK
----------------------------------------------------------------------------------------
Key: HHH-3900
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3900
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.2.6, 3.3.1
Reporter: Chris Bredesen
Priority: Minor
In JTASessionContext.currentSession(), a CleanupSync is built and registered. The
transaction is verified to be in progress using JTAHelper.isInProgress() which checks for
STATUS_ACTIVE or STATUS_MARKED_ROLLBACK. JBossTS (based on the OTS standard) disallows
the registration of Synchronizations in STATUS_MARKED_ROLLBACK and so in such cases,
JTASessionContext.currentSession() will fail. The stack trace looks something like this
(note no wrapped root cause):
Caused by: org.hibernate.HibernateException: Unable to register cleanup Synchronization
with TransactionManager
at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:92)
at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:544)
A possible fix is to check only for STATUS_ACTIVE and do any needed cleanup work
proactively if the Transaction is in STATUS_MARKED_ROLLBACK rather than relying on
CleanupSync.
--
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