java - How to get the SQL error origin of an UnexpectedRollbackException -
i have rollback exception hibernate on service "duplicatecontract"
caused by: org.springframework.transaction.unexpectedrollbackexception: jta transaction unexpectedly rolled (maybe due timeout); nested exception javax.transaction.rollbackexception @ org.springframework.transaction.jta.jtatransactionmanager.docommit(jtatransactionmanager.java:1031) @ org.springframework.transaction.support.abstractplatformtransactionmanager.processcommit(abstractplatformtransactionmanager.java:732) @ org.springframework.transaction.support.abstractplatformtransactionmanager.commit(abstractplatformtransactionmanager.java:701) @ org.springframework.transaction.interceptor.transactionaspectsupport.committransactionafterreturning(transactionaspectsupport.java:321) @ org.springframework.transaction.interceptor.transactioninterceptor.invoke(transactioninterceptor.java:116) @ org.springframework.aop.framework.reflectivemethodinvocation.proceed(reflectivemethodinvocation.java:171) @ org.springframework.aop.framework.jdkdynamicaopproxy.invoke(jdkdynamicaopproxy.java:204) @ $proxy128.duplicatecontracts(unknown source) @ com.test.server.rpc.srvcontractimpl.duplicatecontracts(srvcontractimpl.java:699) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:39) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:25) @ java.lang.reflect.method.invoke(method.java:597) @ com.google.gwt.user.server.rpc.rpc.invokeandencoderesponse(rpc.java:561) ... 34 more caused by: javax.transaction.rollbackexception @ org.objectweb.jotm.transactionimpl.commit(transactionimpl.java:329) @ org.objectweb.jotm.current.commit(current.java:485) @ org.springframework.transaction.jta.jtatransactionmanager.docommit(jtatransactionmanager.java:1028) ... 47 more
the problem is, can't debug that, there error persisted object somewhere have no clue ( it's not timeout or missing @transactional ). how can more details exception ? ( maybe somewhere in oracle log ? ? ).
i checked jotm source code and, surprise, they don't propagate 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 have stopped (last 2 releases adate 2006 , 2010), should better check narayana, atomikos or bitronix.
Comments
Post a Comment