These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 
Author Message
 Post subject: before_completion synchronization operation: java.lang.Unsup
PostPosted: Sat Jun 14, 2008 6:48 pm 
Newbie

Joined: Sat Jun 14, 2008 6:42 pm
Posts: 4
I'm getting this Exception when using CMT with hibernate in WAS6.0 and 6.1

WTRN0074E: Exception caught from before_completion synchronization operation: java.lang.UnsupportedOperationException
at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter.setRollbackOnly(WebSphereExtendedJTATransactionLookup.java:211)
at org.hibernate.transaction.CacheSynchronization.setRollbackOnly(CacheSynchronization.java:73)
at org.hibernate.transaction.CacheSynchronization.beforeCompletion(CacheSynchronization.java:63)
at org.hibernate.transaction.WebSphereExtendedJTATransactionLookup$TransactionManagerAdapter$TransactionAdapter$1.invoke(WebSphereExtendedJTATransactionLookup.java:142)
at $Proxy2.beforeCompletion(Unknown Source)
at com.ibm.ws.jtaextensions.SynchronizationCallbackWrapper.beforeCompletion(SynchronizationCallbackWrapper.java:65)
at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:240)
at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2373)
at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(TransactionImpl.java:1606)
at com.ibm.ws.Transaction.JTA.TransactionImpl.processCommit(TransactionImpl.java:1577)
at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1512)
at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:237)
at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:162)
at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:756)
at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:181)
at com.ibm.ejs.csi.RequiresNew.postInvoke(RequiresNew.java:93)
at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:581)
at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3876)
at org.sf.EJSLocalStatelessSampleSF_288913bb.save(Unknown Source)
at org.mdb.SampleMDBBean.onMessage(Unknown Source)
at com.ibm.ejs.container.MessageEndpointHandler.invokeMdbMethod(MessageEndpointHandler.java:992)
at com.ibm.ejs.container.MessageEndpointHandler.invoke(MessageEndpointHandler.java:725)
at $Proxy1.onMessage(Unknown Source)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaEndpointInvokerImpl.invokeEndpoint(JmsJcaEndpointInvokerImpl.java:201)
at com.ibm.ws.sib.ra.inbound.impl.SibRaDispatcher.dispatch(SibRaDispatcher.java:708)
at com.ibm.ws.sib.ra.inbound.impl.SibRaSingleProcessListener$SibRaWork.run(SibRaSingleProcessListener.java:584)
at com.ibm.ejs.j2c.work.WorkProxy.run(WorkProxy.java:497)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)


Last edited by rk1891 on Tue Mar 17, 2009 5:56 pm, edited 3 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 15, 2008 10:55 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
I've seen this happen sometimes when you try to access a read-only property, or you are using a collection class when only a LinkedList will do. Perhaps somewhere in your MDB?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


Top
 Profile  
 
 Post subject:
PostPosted: Thu Oct 23, 2008 10:26 pm 
Newbie

Joined: Sat Jun 14, 2008 6:42 pm
Posts: 4
Thanks for you post McKenzie.

But that is not the problem as you mentioned because the exception trace is leading to Hibernate transaction classes.


Here is the summary...

When we use the following in hibernate configuration with WAS6.0 or WAS6.1 and leave the transaction control to WAS

<property name="transaction.factory_class"> org.hibernate.transaction.CMTTransactionFactory
</property>
<property name="transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
</property>
<property name="hibernate.current_session_context_class">jta</property>


You tend to get that
"Exception caught from before_completion synchronization operation: java.lang.UnsupportedOperationException"
Whenever the transaction fails in the middle and it tries to rollback.

But when i used session.flush() in the DAO to force the database inserts then i'm not getting that excetpion.

Here i want to tell the flow of the process also since that may also have some relations to the above pb.

It's starts from MDB and then goes to Stateless SessionBean and from there to DAO.
For my MDB onMessage method i specified the transaction setting as 'Required' and for the method in EJB 'RequiresNew'

But the above settings are good in my knowledge and has nothing to do with that Exception.

I feel there might be some bug in Hibernate support classes for WAS.

PS:Posting this summary hoping that it helps somebody who faces the same problem.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.