一段罕见的EJB调用报错AppSetRollbackOnlyException
问题背景 1、测试环境中: paymentItemDelegate ---->paymentServiceEjb(非xa 有调用dao)---->pamentPojoService----->daopaymentServiceEjb 部分遇到了 pamentPojoService 返回的错误标记,做出了SessionContext.getRollbackOnly()
回滚完毕后,就报错,如下。 但是我将paymentServiceEjb配置成XA环境,即dao获取datasourc 都为XA的,则不会报错。
但是我将此服务配置在 本地环境中,无论paymentServiceEjb 获取的DATASOURCE是否为XA的,回滚均不报错。
ps:测试环境是分布式环境,本地环境只有一个weblog。
这个问题困扰了很久,翻阅资料无数,求各位大侠能否指点迷津。
<2012-9-18 下午06时35分37秒 CST> <Error> <JTA> <BEA-110412> <Name=[EJB com.palic.epcis.claim.business.PaymentServiceEJB.doPaymentItemDownBussiness(java.util.Map)],Xid=BEA1-05A63B66332426AB44A7(110624898),Status=Rolled back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=1,seconds left=60,activeThread=Thread[ExecuteThread: '45' for queue: 'weblogic.kernel.Default',5,Thread Group for Queue: 'weblogic.kernel.Default'],XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=CHSDRServer0027),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@69b953a,re-Registered = false),SCInfo[StgSFWLDom519+CHSDRServer0027]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.palic.epcis.claim.business.PaymentServiceEJB.doPaymentItemDownBussiness(java.util.Map)], weblogic.jdbc=t3://cnsh040250.app.paic.com.cn:42060}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=CHSDRServer0027+cnsh040250.app.paic.com.cn:42060+StgSFWLDom519+t3+, XAResources={pool/luzz0_xa, pool/xaegis, pool/lulz0_xa, pool/paolap_xa, pool/ludl0_xa, pool/gsehis_xa, weblogic.jdbc.wrapper.JTSXAResourceImpl, pool/epcis_xa, pool/chs-core/GBS_XA, pool/lass_xa, pool/eliscenter_xa, JMS_CHSJMSJDBCStore, pool/lucd0_xa, pool/luhz0_xa},NonXAResources={})],CoordinatorURL=CHSDRServer0027+cnsh040250.app.paic.com.cn:42060+StgSFWLDom519+t3+) completed heuristically: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: ORA-01013: user requested cancel of current operation--------------------编程问答-------------------- 各位大虾,抽空看看啊 --------------------编程问答-------------------- 不好办,
)) >
<2012-9-18 下午06时35分37秒 CST> <Error> <EJB> <BEA-010025> <Exception occurred during rollback of transaction Name=[EJB com.palic.epcis.claim.business.PaymentServiceEJB.doPaymentItemDownBussiness(java.util.Map)],Xid=BEA1-05A63B66332426AB44A7(110624898),Status=Rolled back. [Reason=weblogic.transaction.internal.AppSetRollbackOnlyException],HeuristicErrorCode=XA_HEURHAZ,numRepliesOwedMe=0,numRepliesOwedOthers=0,seconds since begin=1,seconds left=60,XAServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(ServerResourceInfo[weblogic.jdbc.wrapper.JTSXAResourceImpl]=(state=rolledback,assigned=CHSDRServer0027),xar=weblogic.jdbc.wrapper.JTSXAResourceImpl@69b953a,re-Registered = false),SCInfo[StgSFWLDom519+CHSDRServer0027]=(state=rolledback),properties=({weblogic.transaction.name=[EJB com.palic.epcis.claim.business.PaymentServiceEJB.doPaymentItemDownBussiness(java.util.Map)], weblogic.jdbc=t3://cnsh040250.app.paic.com.cn:42060}),OwnerTransactionManager=ServerTM[ServerCoordinatorDescriptor=(CoordinatorURL=CHSDRServer0027+cnsh040250.app.paic.com.cn:42060+StgSFWLDom519+t3+, XAResources={pool/luzz0_xa, pool/xaegis, pool/lulz0_xa, pool/paolap_xa, pool/ludl0_xa, pool/gsehis_xa, weblogic.jdbc.wrapper.JTSXAResourceImpl, pool/epcis_xa, pool/chs-core/GBS_XA, pool/lass_xa, pool/eliscenter_xa, JMS_CHSJMSJDBCStore, pool/lucd0_xa, pool/luhz0_xa},NonXAResources={})],CoordinatorURL=CHSDRServer0027+cnsh040250.app.paic.com.cn:42060+StgSFWLDom519+t3+): javax.transaction.SystemException: Heuristic hazard: (weblogic.jdbc.wrapper.JTSXAResourceImpl, HeuristicHazard, (javax.transaction.xa.XAException: ORA-01013: user requested cancel of current operation
))
at weblogic.transaction.internal.ServerTransactionImpl.internalRollback(ServerTransactionImpl.java:384)
at weblogic.transaction.internal.ServerTransactionImpl.rollback(ServerTransactionImpl.java:350)
at weblogic.ejb20.internal.BaseEJBObject.postInvoke(BaseEJBObject.java:300)
at weblogic.ejb20.internal.StatelessEJBObject.postInvoke(StatelessEJBObject.java:168)
at com.palic.epcis.claim.business.PaymentServiceEJB_8jx77h_EOImpl.doPaymentItemDownBussiness(PaymentServiceEJB_8jx77h_EOImpl.java:448)
at com.palic.epcis.claim.business.PaymentServiceEJB_8jx77h_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:492)
at weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java:108)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:435)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:430)
at weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:35)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
>
<Thread-67><2012年09月18日18:35:37:724><CHS DEBUG>: [take_asyn_gbsauto_notice_group0][com.palic.elis.claim.business.task.ClaimGBSAutoNoticeProcessTask]===>prepare execute..
jta事务,肯定是要xa数据源的,
,不想看到错误,把它catch掉
补充:Java , Web 开发