im trying to test jenks outbound jdbc. but there is a problem.
when i trying to test rollback,there is a SQLException, rollback does not
work.
in follwing code, with Outbound JDBC configuration with Jencks
===========================================================
transactionManager.begin();
c = ds.getConnection(user,pwd);
s = c.createStatement();
// throws java.sql.SQLException - a key is already exist.
s.executeQuery("insert into message values('2','2','n','n')");
transactionManager.rollback();
==========================================================
i got exception as follow.......
WARN - Transaction - Error ending association for
XAResource org.apache.geronimo.transaction.manager
[EMAIL PROTECTED]; transaction will roll back. XA error code:
-4javax.transaction.xa.XAException
at
org.enhydra.jdbc.standard.StandardXADataSource.getConnection(StandardXADataSource.java:444)
at
org.enhydra.jdbc.standard.StandardXAConnection.end(StandardXAConnection.java:384)
at
org.apache.geronimo.transaction.manager.WrapperNamedXAResource.end(WrapperNamedXAResource.java:51)
at
org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:571)
at
org.apache.geronimo.transaction.manager.TransactionImpl.endResources(TransactionImpl.java:551)
at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:472)
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:276)
at com.mb.indigoesb.tx.RBean.init(RBean.java:157)
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
org.apache.servicemix.bean.support.ReflectionUtils$1.doWith(ReflectionUtils.java:32)
at
org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:226)
at
org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:203)
at
org.apache.servicemix.bean.support.ReflectionUtils.callLifecycleMethod(ReflectionUtils.java:28)
at
org.apache.servicemix.bean.BeanEndpoint.start(BeanEndpoint.java:100)
at
org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(SimpleEndpoint.java:55)
at
org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)
at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:132)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:378)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:35
2)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
ERROR - Transaction - Unexpected exception rolling back
org.apache.geronimo.transaction.manager.Wrapp
[EMAIL PROTECTED]; continuing with rollback
javax.transaction.xa.XAException
at
org.enhydra.jdbc.standard.StandardXADataSource.getConnection(StandardXADataSource.java:444)
at
org.enhydra.jdbc.standard.StandardXAConnection.rollback(StandardXAConnection.java:547)
at
org.apache.geronimo.transaction.manager.WrapperNamedXAResource.rollback(WrapperNamedXAResource.java:78)
at
org.apache.geronimo.transaction.manager.TransactionImpl.rollbackResources(TransactionImpl.java:589)
at
org.apache.geronimo.transaction.manager.TransactionImpl.rollback(TransactionImpl.java:474)
at
org.apache.geronimo.transaction.manager.TransactionManagerImpl.rollback(TransactionManagerImpl.java:276)
at com.mb.indigoesb.tx.RBean.init(RBean.java:157)
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
org.apache.servicemix.bean.support.ReflectionUtils$1.doWith(ReflectionUtils.java:32)
at
org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:226)
at
org.springframework.util.ReflectionUtils.doWithMethods(ReflectionUtils.java:203)
at
org.apache.servicemix.bean.support.ReflectionUtils.callLifecycleMethod(ReflectionUtils.java:28)
at
org.apache.servicemix.bean.BeanEndpoint.start(BeanEndpoint.java:100)
at
org.apache.servicemix.common.endpoints.SimpleEndpoint.activate(SimpleEndpoint.java:55)
at
org.apache.servicemix.common.ServiceUnit.start(ServiceUnit.java:53)
at
org.apache.servicemix.common.BaseServiceUnitManager.start(BaseServiceUnitManager.java:151)
at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.start(ServiceUnitLifeCycle.java:103)
at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.start(ServiceAssemblyLifeCycle.java:132)
at
org.apache.servicemix.jbi.framework.DeploymentService.start(DeploymentService.java:378)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServiceAssembly(AutoDeploymentService.java:35
2)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchive(AutoDeploymentService.java:253)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDirectory(AutoDeploymentService.java:647)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(AutoDeploymentService.java:60)
at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoDeploymentService.java:611)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
what is the problem?
please help me, thanks in advance.
--
View this message in context:
http://www.nabble.com/SQLException-and-rollback-problem-tf4535215.html#a12942798
Sent from the jencks - user mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email