[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5019?page=c...
]
Tulips commented on HHH-5019:
-----------------------------
Websphere suggested fix to resolve this issue for its default JPA provider -
http://www-01.ibm.com/support/docview.wss?rs=0&uid=swg21287383, does not seem to apply
for Hibernate.
persistence.xml is provided with both JTA and Non-JTA datasource specified.
<persistence-unit name="test1">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>jdbc/transDS</jta-data-source>
<non-jta-data-source>jdbc/nonTransDS</non-jta-data-source>
<class>com.test.TestEntity</class>
<exclude-unlisted-classes>false</exclude-unlisted-classes>
<properties>
<property name="hibernate.dialect"
value="org.hibernate.dialect.MySQLDialect" />
<property name="hibernate.show_sql" value="true" />
<property name="hibernate.transaction.factory_class"
value="org.hibernate.transaction.CMTTransactionFactory"/>
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.WebSphereExtendedJTATransactionLookup"/>
<property name="hibernate.transaction.flush_before_completion"
value="true"/>
<property name="hibernate.transaction.auto_close_session"
value="true"/>
<property name="hibernate.current_session_context_class"
value="jta"/>
</properties>
</persistence-unit>
I beleive this could be because - doIsolatedWork(work, session) method of
org.hibernate.engine.transaction.Isolater makes a JTADelegate for all CMT transactions,
which results in Unsupported exception in case Websphere appserver.
@TableGenerator throws Unsupported exception - error performing
isolated work
-----------------------------------------------------------------------------
Key: HHH-5019
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5019
Project: Hibernate Core
Issue Type: Bug
Affects Versions: 3.2.1, 3.2.2, 3.2.3, 3.2.4, 3.2.4.sp1, 3.2.5, 3.2.6, 3.2.7,
3.3.0.CR1, 3.3.0.CR2, 3.3.0.GA, 3.3.0.SP1, 3.3.1
Environment: Hibernate Core 3.3.1, MySQL, Websphere 6.1 with EJB3.0 Feature pack
Reporter: Tulips
While implementing GenerationType.TABLE strategy with Hibernate as the persistence
provider, id generation throws
javax.persistence.PersistenceException: org.hibernate.HibernateException: error
performing isolated work
[3/18/10 14:40:41:533 IST] 0000002d SystemErr R at
org.hibernate.ejb.AbstractEntityManagerImpl.throwPersistenceException(AbstractEntityManagerImpl.java:614)
--------------------------------------------------------------
3/18/10 14:40:41:533 IST] 0000002d SystemErr R Caused by:
org.hibernate.HibernateException: error performing isolated work
at
org.hibernate.engine.transaction.Isolater$JtaDelegate.delegateWork(Isolater.java:166)
at org.hibernate.engine.transaction.Isolater.doIsolatedWork(Isolater.java:64)
at
org.hibernate.engine.TransactionHelper.doWorkInNewTransaction(TransactionHelper.java:74)
at
org.hibernate.id.MultipleHiLoPerTableGenerator.generate(MultipleHiLoPerTableGenerator.java:210)
Looking at the
Isolater.doIsolatedWork( work, session );, implementation
try {
// First we need to suspend any current JTA transaction and obtain
// a JDBC connection
surroundingTransaction = transactionManager.suspend();
if ( log.isDebugEnabled() ) {
log.debug( "surrounding JTA transaction suspended [" + surroundingTransaction
+ "]" );
}
This happnes only with WebsphereExtendedTransactionManagerLookup as the
hibernate.transaction.manager_lookup_class.
--
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