title: WebSphere 8.5 with hibernate : UnsupportedOperation Exception
body: <p>I am running into problems when persisting an Entity using hibernate (4.2.7) in an ejb application and  would really need some advice..
  Below are the configuration for the transaction factory and transaction manager in my hibernate configuration file.</p>
  
  <pre><code>    &lt;property name="hibernate.transaction.factory_class"&gt;
          org.hibernate.transaction.CMTTransactionFactory
      &lt;/property&gt;
    &lt;property name="hibernate.transaction.manager_lookup_class"&gt;
      org.hibernate.transaction.WebSphereExtendedJTATransactionLookup
      &lt;/property&gt;
  </code></pre>
  
  <p>whenver there is an database exception for example, passing an null value to a not null column, constraint issue etc, we are getting the below exception </p>
  
  <pre><code>[5/22/16 15:15:21:481 MYT] 000000b7 RegisteredSyn E   WTRN0074E: Exception caught from before_completion synchronization operation: java.lang.UnsupportedOperationException
          at org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform$TransactionManagerAdapter.setRollbackOnly(WebSphereExtendedJtaPlatform.java:139)
          at org.hibernate.engine.transaction.internal.jta.CMTTransaction.markRollbackOnly(CMTTransaction.java:131)
          at org.hibernate.engine.transaction.internal.TransactionCoordinatorImpl.setRollbackOnly(TransactionCoordinatorImpl.java:306)
          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.setRollbackOnly(SynchronizationCallbackCoordinatorImpl.java:127)
          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:117)
          at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53)
          at org.hibernate.service.jta.platform.internal.WebSphereExtendedJtaPlatform$TransactionManagerAdapter$TransactionAdapter$1.invoke(WebSphereExtendedJtaPlatform.java:176)
          at com.sun.proxy.$Proxy75.beforeCompletion(Unknown Source)
  </code></pre>
  
  <p>Because of which we are unable to determine what is the actual issues, Our database is Oracle.
  Is there any way that we can get the exact database exception thrown ?</p>
  
  <p>any leads would be very helpful. Thank you</p>