oracle - ORA-02051: another session or branch in same transaction failed or finalized -
i have problem xa transaction.
if @ picture, xa transaction flow order numbered. call number 3
half-workaround have found far half-solve problem. mean, if don't make select 1
query database 2
before accesing ejb 2, transaction fails.
i half-solves problem, because when put select 1
query, servlet doesn't crash , can complete transaction. workaround not applicable in other scenarios example external b2b client don't have , shouldn't have access our internal database 2
, can't make select 1
query fix it.
the concrete exception point in hibernate beforecomplete
synchronization
. crashes when hibernate flushing cache database 2
oracle throws error:
ora-02051: session or branch in same transaction failed or finalized
after spending days making proves , reading omg "transaction service specification" , chapter 10 of book "mastering ejb" cannot understand why xa transaction fails ;)
i grateful if can me in either way.
the full stack trace this:
2014-11-11 18:27:27,365 debug [orb.thread.pool : 0] [logicalconnectionimpl] [f59d55f3-8361-4c80-975c-8df36f89b7c3] obtained jdbc connection 2014-11-11 18:27:27,428 debug [orb.thread.pool : 0] [sqlexceptionhelper] [f59d55f3-8361-4c80-975c-8df36f89b7c3] not execute statement [n/a] java.sql.sqlsyntaxerrorexception: ora-02051: otra sesi?? bifurcaci??ha fallado o terminado en la misma transacci?? @ oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:445) @ oracle.jdbc.driver.t4cttioer.processerror(t4cttioer.java:396) @ oracle.jdbc.driver.t4c8oall.processerror(t4c8oall.java:879) @ oracle.jdbc.driver.t4cttifun.receive(t4cttifun.java:450) @ oracle.jdbc.driver.t4cttifun.dorpc(t4cttifun.java:192) @ oracle.jdbc.driver.t4c8oall.dooall(t4c8oall.java:531) @ oracle.jdbc.driver.t4cpreparedstatement.dooall8(t4cpreparedstatement.java:207) @ oracle.jdbc.driver.t4cpreparedstatement.executeforrows(t4cpreparedstatement.java:1044) @ oracle.jdbc.driver.oraclestatement.doexecutewithtimeout(oraclestatement.java:1329) @ oracle.jdbc.driver.oraclepreparedstatement.executeinternal(oraclepreparedstatement.java:3584) @ oracle.jdbc.driver.oraclepreparedstatement.executeupdate(oraclepreparedstatement.java:3665) @ oracle.jdbc.driver.oraclepreparedstatementwrapper.executeupdate(oraclepreparedstatementwrapper.java:1352) @ com.ibm.ws.rsadapter.jdbc.wsjdbcpreparedstatement.pmiexecuteupdate(wsjdbcpreparedstatement.java:1185) @ com.ibm.ws.rsadapter.jdbc.wsjdbcpreparedstatement.executeupdate(wsjdbcpreparedstatement.java:802) @ org.hibernate.engine.jdbc.internal.resultsetreturnimpl.executeupdate(resultsetreturnimpl.java:186) @ org.hibernate.engine.jdbc.batch.internal.nonbatchingbatch.addtobatch(nonbatchingbatch.java:58) @ org.hibernate.persister.entity.abstractentitypersister.insert(abstractentitypersister.java:3079) @ org.hibernate.persister.entity.abstractentitypersister.insert(abstractentitypersister.java:3521) @ org.hibernate.action.internal.entityinsertaction.execute(entityinsertaction.java:88) @ org.hibernate.engine.spi.actionqueue.execute(actionqueue.java:393) @ org.hibernate.engine.spi.actionqueue.executeactions(actionqueue.java:385) @ org.hibernate.engine.spi.actionqueue.executeactions(actionqueue.java:301) @ org.hibernate.event.internal.abstractflushingeventlistener.performexecutions(abstractflushingeventlistener.java:349) @ org.hibernate.event.internal.defaultflusheventlistener.onflush(defaultflusheventlistener.java:56) @ org.hibernate.internal.sessionimpl.flush(sessionimpl.java:1159) @ org.hibernate.internal.sessionimpl.managedflush(sessionimpl.java:404) @ org.hibernate.engine.transaction.synchronization.internal.synchronizationcallbackcoordinatornontrackingimpl.beforecompletion(synchronizationcallbackcoordinatornontrackingimpl.java:106) @ org.hibernate.engine.transaction.synchronization.internal.registeredsynchronization.beforecompletion(registeredsynchronization.java:53) @ com.ibm.ws.uow.componentcontextsynchronizationwrapper.beforecompletion(componentcontextsynchronizationwrapper.java:65) @ com.ibm.tx.jta.impl.registeredsyncs.coredistributebefore(registeredsyncs.java:291) @ com.ibm.ws.tx.jta.registeredsyncs.distributebefore(registeredsyncs.java:153) @ com.ibm.ws.tx.jta.transactionimpl.preprepare(transactionimpl.java:2339) @ com.ibm.tx.jta.impl.transactionimpl.internalprepare(transactionimpl.java:1422) @ com.ibm.ws.transaction.jts.transactionwrapper.prepare(transactionwrapper.java:204) @ com.ibm.ws.transaction.jts.wscoordinatorimpl.prepare(wscoordinatorimpl.java:144) @ com.ibm.ws.transaction.jts._wscoordinatorimplbase._invoke(_wscoordinatorimplbase.java:50) @ com.ibm.corba.iiop.serverdelegate.dispatchinvokehandler(serverdelegate.java:669) @ com.ibm.corba.iiop.serverdelegate.dispatch(serverdelegate.java:523) @ com.ibm.rmi.iiop.orb.process(orb.java:523) @ com.ibm.corba.iiop.orb.process(orb.java:1575) @ com.ibm.rmi.iiop.connection.dorequestwork(connection.java:3039) @ com.ibm.rmi.iiop.connection.dowork(connection.java:2922) @ com.ibm.rmi.iiop.workunitimpl.dowork(workunitimpl.java:64) @ com.ibm.ejs.oa.pool.pooledthread.run(threadpool.java:118) @ com.ibm.ws.util.threadpool$worker.run(threadpool.java:1815)
update:
same use case works fine on wildfly attacking either oracle database server, oracle xe or postgresql. seams it's problem. think?
Comments
Post a Comment