Regarding the UnsupportedOperationException in hibernate
i had used cascade="all-delete-orphan" in *.hbm.xml file i am getting the following exception can you pls tell how to resolve this
RegisteredSyn E 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$1.invoke(WebSphereExtendedJTATransactionLookup.java:142) at $Proxy1.beforeCompletion(Unknown Source) at com.ibm.ws.jtaextensions.SynchronizationCallbackWrapper.beforeCompletion(SynchronizationCallbackWrapper.java:65) at com.ibm.ws.Transaction.JTA.RegisteredSyncs.distributeBefore(RegisteredSyncs.java:171) at com.ibm.ws.Transaction.JTA.TransactionImpl.prePrepare(TransactionImpl.java:2109) at com.ibm.ws.Transaction.JTA.TransactionImpl.stage1CommitProcessing(开发者_开发问答TransactionImpl.java:1538) at com.ibm.ws.Transaction.JTA.TransactionImpl.commit(TransactionImpl.java:1372) at com.ibm.ws.Transaction.JTA.TranManagerImpl.commit(TranManagerImpl.java:231) at com.ibm.ws.Transaction.JTA.TranManagerSet.commit(TranManagerSet.java:156) at com.ibm.ejs.csi.TranStrategy.commit(TranStrategy.java:716) at com.ibm.ejs.csi.TranStrategy.postInvoke(TranStrategy.java:167) at com.ibm.ejs.csi.TransactionControlImpl.postInvoke(TransactionControlImpl.java:564) at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3798) at com.ibm.ejs.container.EJSContainer.postInvoke(EJSContainer.java:3620)
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.
精彩评论