I have a rollback exception with hibernate on my service "duplicateContract"
Caused by: org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1031)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:732)
at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:701)
at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:321)
at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:116)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
at $Proxy128.duplicateContracts(Unknown Source)
at com.test.server.rpc.SrvContractImpl.duplicateContracts(SrvContractImpl.java:699)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:561)
... 34 more
Caused by: javax.transaction.RollbackException
at org.objectweb.jotm.TransactionImpl.commit(TransactionImpl.java:329)
at org.objectweb.jotm.Current.commit(Current.java:485)
at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1028)
... 47 more
The problem is, I just can't debug that, there is an error with the persisted object somewhere but I have no clue ( it's not a timeout or missing @Transactional ). How can I get more details for this exception ? ( maybe somewhere in oracle log ? but where ? ).
I checked the JOTM source code and, to my surprise, they don't propagate the original exception.
try {
propagateCtx = false;
term.commit(true);
propagateCtx = true;
} catch (TransactionRolledbackException e) {
Current.getCurrent().forgetTx(getXid());
if (TraceTm.jta.isDebugEnabled()) {
TraceTm.jta.debug("Commit distributed transaction -> rolled back!");
}
localstatus = Status.STATUS_ROLLEDBACK;
throw new RollbackException();
}
...
The JOTM project development seems to have stopped (last two releases adate back to 2006 and 2010), so you should better check Narayana, Atomikos or Bitronix.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With