Atomikos Forum |
|
I am getting below error when I use XA datasource with postgre, any ideas?
<pre> 11-02-11 17:37:41,418 [main] getCompositeTransaction() returning instance with id 10.10.40.157.tm0000500001 11-02-11 17:37:41,418 [main] atomikos connection proxy for Pooled connection wrapping physical connection org.postgresql.jdbc4.Jdbc4Connection@1d4ee7e: notifyBeforeUse a SessionHandleState with 7 context(s) 11-02-11 17:37:41,418 [main] getCompositeTransaction() returning instance with id 10.10.40.157.tm0000500001 11-02-11 17:37:41,418 [main] a SessionHandleState with 7 context(s): checking XA context for transaction com.atomikos.icatch.imp.CompositeTransactionImp@26dcd362 11-02-11 17:37:41,418 [main] Coordinator 10.10.40.157.tm0000500001 entering state: ACTIVE 11-02-11 17:37:41,418 [main] Coordinator 10.10.40.157.tm0000500001 entered state: ACTIVE 11-02-11 17:37:41,419 [main] addParticipant ( XAResourceTransaction: 31302E31302E34302E3135372E746D30303030353030303031:31302E31302E34302E3135372E746D36 ) for transaction 10.10.40.157.tm0000500001 11-02-11 17:37:41,419 [main] XAResourceTransaction: 31302E31302E34302E3135372E746D30303030353030303031:31302E31302E34302E3135372E746D36: about to switch to XAResource org.postgresql.xa.PGXAConnection@122e15b 11-02-11 17:37:41,419 [main] XAResourceTransaction 10.10.40.157.tm000050000110.10.40.157.tm6: switched to XAResource org.postgresql.xa.PGXAConnection@122e15b 11-02-11 17:37:41,419 [main] XAResource.start ( 31302E31302E34302E3135372E746D30303030353030303031:31302E31302E34302E3135372E746D36 , XAResource.TMJOIN ) on resource postgreDb represented by XAResource instance org.postgresql.xa.PGXAConnection@122e15b 11-02-11 17:37:41,425 [main] XA resource 'postgreDb': resume for XID '31302E31302E34302E3135372E746D30303030353030303031:31302E31302E34302E3135372E746D36' raised -3: the XA resource detected an internal error org.postgresql.xa.PGXAException: Transaction interleaving not implemented at org.postgresql.xa.PGXAConnection.start(PGXAConnection.java:197) at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:476) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:57) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:66) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:85) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:176) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:197) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:131) at $Proxy73.prepareStatement(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534) at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:145) at com.bdi.db.hibernate.postgres.DefaultSequenceNameGenerator.generate(DefaultSequenceNameGenerator.java:80) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122) at org.hibernate.ejb.event.EJB3MergeEventListener.saveWithGeneratedId(EJB3MergeEventListener.java:43) at org.hibernate.event.def.DefaultMergeEventListener.mergeTransientEntity(DefaultMergeEventListener.java:314) at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:282) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:237) at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:715) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:697) at org.hibernate.engine.CascadingAction$6.cascade(CascadingAction.java:268) at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:292) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:240) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:193) at org.hibernate.engine.Cascade.cascade(Cascade.java:154) at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) at org.hibernate.event.def.DefaultMergeEventListener.mergeTransientEntity(DefaultMergeEventListener.java:306) at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:282) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:237) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84) at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:705) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:689) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:693) at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:235) 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.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365) at $Proxy75.merge(Unknown Source) at org.springframework.orm.jpa.JpaTemplate$6.doInJpa(JpaTemplate.java:273) at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183) at org.springframework.orm.jpa.JpaTemplate.merge(JpaTemplate.java:271) at com.bdi.db.hibernate.JpaDaoSupportWrapper.save(JpaDaoSupportWrapper.java:123) at com.bdi.db.hibernate.HibernateDao.save(HibernateDao.java:97) at com.bdi.core.SampleCustomer.make(SampleCustomer.java:67) at com.bdi.core.SampleCustomer.make(SampleCustomer.java:83) at com.bdi.core.dao.AccountDaoTest.testCountByCustomerStatusOrAccountType(AccountDaoTest.java:55) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785) 11-02-11 17:37:41,427 [main] Error enlisting in transaction - connection might be broken? Please check the logs for more information... com.atomikos.datasource.ResourceException: XA resource 'postgreDb': resume for XID '31302E31302E34302E3135372E746D30303030353030303031:31302E31302E34302E3135372E746D36' raised -3: the XA resource detected an internal error at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:483) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:57) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:66) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:85) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:176) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:197) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:131) at $Proxy73.prepareStatement(Unknown Source) at org.hibernate.jdbc.AbstractBatcher.getPreparedStatement(AbstractBatcher.java:534) at org.hibernate.jdbc.AbstractBatcher.prepareSelectStatement(AbstractBatcher.java:145) at com.bdi.db.hibernate.postgres.DefaultSequenceNameGenerator.generate(DefaultSequenceNameGenerator.java:80) at org.hibernate.event.def.AbstractSaveEventListener.saveWithGeneratedId(AbstractSaveEventListener.java:122) at org.hibernate.ejb.event.EJB3MergeEventListener.saveWithGeneratedId(EJB3MergeEventListener.java:43) at org.hibernate.event.def.DefaultMergeEventListener.mergeTransientEntity(DefaultMergeEventListener.java:314) at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:282) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:237) at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:715) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:697) at org.hibernate.engine.CascadingAction$6.cascade(CascadingAction.java:268) at org.hibernate.engine.Cascade.cascadeToOne(Cascade.java:292) at org.hibernate.engine.Cascade.cascadeAssociation(Cascade.java:240) at org.hibernate.engine.Cascade.cascadeProperty(Cascade.java:193) at org.hibernate.engine.Cascade.cascade(Cascade.java:154) at org.hibernate.event.def.AbstractSaveEventListener.cascadeBeforeSave(AbstractSaveEventListener.java:454) at org.hibernate.event.def.DefaultMergeEventListener.mergeTransientEntity(DefaultMergeEventListener.java:306) at org.hibernate.event.def.DefaultMergeEventListener.entityIsTransient(DefaultMergeEventListener.java:282) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:237) at org.hibernate.event.def.DefaultMergeEventListener.onMerge(DefaultMergeEventListener.java:84) at org.hibernate.impl.SessionImpl.fireMerge(SessionImpl.java:705) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:689) at org.hibernate.impl.SessionImpl.merge(SessionImpl.java:693) at org.hibernate.ejb.AbstractEntityManagerImpl.merge(AbstractEntityManagerImpl.java:235) 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.springframework.orm.jpa.ExtendedEntityManagerCreator$ExtendedEntityManagerInvocationHandler.invoke(ExtendedEntityManagerCreator.java:365) at $Proxy75.merge(Unknown Source) at org.springframework.orm.jpa.JpaTemplate$6.doInJpa(JpaTemplate.java:273) at org.springframework.orm.jpa.JpaTemplate.execute(JpaTemplate.java:183) at org.springframework.orm.jpa.JpaTemplate.merge(JpaTemplate.java:271) at com.bdi.db.hibernate.JpaDaoSupportWrapper.save(JpaDaoSupportWrapper.java:123) at com.bdi.db.hibernate.HibernateDao.save(HibernateDao.java:97) at com.bdi.core.SampleCustomer.make(SampleCustomer.java:67) at com.bdi.core.SampleCustomer.make(SampleCustomer.java:83) at com.bdi.core.dao.AccountDaoTest.testCountByCustomerStatusOrAccountType(AccountDaoTest.java:55) 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.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:28) at org.springframework.test.context.junit4.statements.RunBeforeTestMethodCallbacks.evaluate(RunBeforeTestMethodCallbacks.java:74) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:31) at org.springframework.test.context.junit4.statements.RunAfterTestMethodCallbacks.evaluate(RunAfterTestMethodCallbacks.java:82) at org.springframework.test.context.junit4.statements.SpringRepeat.evaluate(SpringRepeat.java:72) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.runChild(SpringJUnit4ClassRunner.java:240) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184) at org.springframework.test.context.junit4.statements.RunBeforeTestClassCallbacks.evaluate(RunBeforeTestClassCallbacks.java:61) at org.springframework.test.context.junit4.statements.RunAfterTestClassCallbacks.evaluate(RunAfterTestClassCallbacks.java:70) at org.junit.runners.ParentRunner.run(ParentRunner.java:236) at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.run(SpringJUnit4ClassRunner.java:180) at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:422) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:931) at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:785) 11-02-11 17:37:41,428 [main] getCompositeTransaction() returning instance with id 10.10.40.157.tm0000500001 11-02-11 17:37:41,428 [main] getCompositeTransaction() returning instance with id 10.10.40.157.tm0000500001 11-02-11 17:37:41,428 [main] getCompositeTransaction() returning instance with id 10.10.40.157.tm0000500001 11-02-11 17:37:41,428 [main] Coordinator 10.10.40.157.tm0000500001 entering state: ACTIVE 11-02-11 17:37:41,428 [main] Coordinator 10.10.40.157.tm0000500001 entered state: ACTIVE 11-02-11 17:37:41,428 [main] registerSynchronization ( com.atomikos.icatch.jta.Sync2Sync@14a4639 ) for transaction 10.10.40.157.tm0000500001 </pre> |