调用XA操作异常,无法重新创建事务参与者的 XAResource

问题描述

——在Was后台日志,频繁报下述错误,求各位大神分析下,谢谢![14-12-189:52:15:262CST]00000013XARecoveryDatAWTRN0151I:正在准备对XAResource:cells/SHH-HQ-PMS01SCell01/clusters/CmdpmsCluster/resources.xml#J2CResourceAdapter_1331453023382调用XA恢复操作[14-12-189:52:15:286CST]00000037SystemOutO2014-12-1809:52:15,286[ebContainer:7]INFOEntityService----------EntityService-----------load-----------end[14-12-189:52:15:288CST]00000013XARecoveryDatWWTRN0005W:无法重新创建事务参与者的XAResource,并且无法正确完成事务恢复操作。资源是com.ibm.ws.tx.jta.ASWrapper@888c39f。异常堆栈跟踪如下:com.ibm.ws.Transaction.XAResourceNotAvailableException:java.lang.Exception:RA.getXAResources()returnedwrongnumberofXAResources:0atcom.ibm.ws.tx.jta.ASXAResourceFactoryImpl.getXAResource(ASXAResourceFactoryImpl.java:142)atcom.ibm.ws.Transaction.JTA.XARecoveryData.getXARminst(XARecoveryData.java:504)atcom.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:652)atcom.ibm.tx.jta.impl.PartnerLogTable.recover(PartnerLogTable.java:431)atcom.ibm.tx.jta.impl.RecoveryManager.resync(RecoveryManager.java:1533)atcom.ibm.tx.jta.impl.RecoveryManager.performResync(RecoveryManager.java:2266)atcom.ibm.ws.tx.jta.RecoveryManager.performResync(RecoveryManager.java:117)atcom.ibm.tx.jta.impl.RecoveryManager.run(RecoveryManager.java:2219)atjava.lang.Thread.run(Thread.java:737)Causedby:java.lang.Exception:RA.getXAResources()returnedwrongnumberofXAResources:0...9more

解决方案

解决方案二:

解决方案三:

WAS经常报一些死锁问题,最近总是出现此类问题,而且每次出现必须重启was才会好点。was后台日志如下:<openjpa-2.1.1-SNAPSHOT-r422266:1141200fatalstoreerror>org.apache.openjpa.persistence.OptimisticLockException:无法获取“null”上的对象锁定。FailedObject:SELECTDISTINCTpdFROMPurchaseDocpd,PurchaseEntranceDocpedWHEREpd.defunctInd=falseANDpd.purchaseLoc.id=736801ANDpd.purchaseEntityId=736901ANDUPPER(pd.purchaseAgreement.purchaseAgreementNo)LIKE'%XY0960000205%'ORDERBYpd.purchaseDocNoDESC[java.lang.String]atorg.apache.openjpa.jdbc.sql.DBDictionary.narrow(DBDictionary.java:4853)atorg.apache.openjpa.jdbc.sql.DBDictionary.newStoreException(DBDictionary.java:4831)atorg.apache.openjpa.jdbc.sql.DB2Dictionary.newStoreException(DB2Dictionary.java:593)atorg.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:136)atorg.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:118)atorg.apache.openjpa.jdbc.sql.SQLExceptions.getStore(SQLExceptions.java:70)atorg.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:709)atcom.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.load(WsJpaJDBCStoreManager.java:130)atorg.apache.openjpa.kernel.DelegatingStoreManager.load(DelegatingStoreManager.java:117)atorg.apache.openjpa.kernel.ROPStoreManager.load(ROPStoreManager.java:78)atorg.apache.openjpa.kernel.StateManagerImpl.loadFields(StateManagerImpl.java:3061)atorg.apache.openjpa.kernel.StateManagerImpl.load(StateManagerImpl.java:451)atorg.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:995)atorg.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:907)atorg.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1041)atorg.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)atorg.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2381)atorg.apache.openjpa.jdbc.meta.strats.RelationFieldStrategy.loadEagerJoin(RelationFieldStrategy.java:706)atorg.apache.openjpa.jdbc.meta.FieldMapping.loadEagerJoin(FieldMapping.java:922)atorg.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1111)atorg.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1067)atorg.apache.openjpa.jdbc.kernel.JDBCStoreManager.initializeState(JDBCStoreManager.java:438)atorg.apache.openjpa.jdbc.kernel.JDBCStoreManager.initialize(JDBCStoreManager.java:333)atcom.ibm.ws.persistence.jdbc.kernel.WsJpaJDBCStoreManager.initialize(WsJpaJDBCStoreManager.java:149)atorg.apache.openjpa.kernel.DelegatingStoreManager.initialize(DelegatingStoreManager.java:112)atorg.apache.openjpa.kernel.ROPStoreManager.initialize(ROPStoreManager.java:57)atorg.apache.openjpa.kernel.BrokerImpl.initialize(BrokerImpl.java:1027)atorg.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:985)atorg.apache.openjpa.kernel.BrokerImpl.find(BrokerImpl.java:907)atorg.apache.openjpa.jdbc.kernel.JDBCStoreManager.load(JDBCStoreManager.java:1041)atorg.apache.openjpa.jdbc.sql.AbstractResult.load(AbstractResult.java:280)atorg.apache.openjpa.jdbc.sql.SelectImpl$SelectResult.load(SelectImpl.java:2381)Causedby:org.apache.openjpa.lib.jdbc.ReportingSQLException:因为死锁或超时,所以当前事务已回滚。原因码为"2"。.SQLCODE=-911,SQLSTATE=40001,DRIVER=4.7.85{prepstmnt635040299SELECTt0.ID,t0.CREATED_BY,t0.CREATED_DATETIME,t0.DEFUNCT_IND,t0.UPDATED_BY,t0.UPDATED_DATETIME,t0.ACTUAL_WEIGHT,t0.ADJUSTED_TOTAL_AMOUNT_HAND,t0.ADJUSTED_TOTAL_PRICE_SYS,t0.ADJUSTED_UNIT_PRICE_HAND,t0.ADJUSTED_UNIT_PRICE_SYS,t0.ADJUSTED_WEIGHT_HAND,t0.ADJUSTED_WEIGHT_SYS,t1.ID,t1.CREATED_BY,t1.CREATED_DATETIME,t1.DEFUNCT_IND,t1.UPDATED_BY,t1.UPDATED_DATETIME,t1.BACK_QUANTITY,t1.BACK_EXECUTED_QUANTITY,t1.BILLING_RULE,t1.CURRENCY,t1.ESTIMA_WHO,t1.EXECUTED_QUANTITY,t1.NOTE_TYPE,t1.ORG_ID,t1.OTHER_CLAUSE,t1.PLANNED_BATCH_NO,t1.PLANNED_STORAGE_LOC,t1.PUR_ID,t1.PURCHASE_AGREEMENT_ITEM,t1.QC_RESULT_AFFECTS_BILLING,t1.QUANTITY,t1.RATIO_SAPLING,t1.LAB_COUNT,t1.TAX_CODE,t1.WEIGHT_UNIT,t0.AUDIT_BY,t0.AUDIT_PERSON_NO_ACCEPTING,t0.BASE_PRICE,t0.BILLING_AMOUNT,t0.BILLING_AUDIT_DATE,t0.BILLING_DATE,t0.BILLING_DOC_ITEM_NO,t0.BILLING_DOC_NO,t0.BILLING_RULE,t0.BILLING_UNIT_PRICE,t0.BILLING_WEIGHT,t0.CAR_NO,t0.CHARG_GI,t0.CURRENCY,t0.DOC_CLOSE,t0.DOC_DATE,t0.ESTIMA_WHO,t0.EX_LIB_DATE,t0.EXPORT_STATUS,t0.FEEDBACK_MESS,t0.FIRST_ENTR_IF,t0.ID_ASSOCIA_COUNT,t0.ID_CARD_ASSOCIATED,t0.LAB_COUNT,t0.LAB_RATIO,t0.LGORT_GI,t0.LGORT_GR,t0.MERGED_BILLING_IND,t2.ID,t2.CREATED_BY,t2.CREATED_DATETIME,t2.DEFUNCT_IND,t2.UPDATED_BY,t2.UPDATED_DATETIME,t2.BILLING_RULE,t2.JUMP_GROUP_NO,t2.MATERIAL_DESC,t2.MATERIAL_ID,t2.ORG_ID2,t2.ORG_ID,t2.PURCHASE_FLOW,t2.PUR_ID,t2.PURCHASE_SEASON_START_DATE,t2.RATIO_OF_SAMPLINGS,t2.REQUIRED_LAB_COUNT,t2.UNIT,t0.NOTE_TYPE,t0.NOTICE_DOC_NO,t3.ID,t3.VERSION,t3.CREATED_BY,t3.CREATED_DATETIME,t3.DEFUNCT_IND,t3.UPDATED_BY,t3.UPDATED_DATETIME,t4.ID,t4.CREATED_BY,t4.CREATED_DATETIME,t4.DEFUNCT_IND,t4.UPDATED_BY,t4.UPDATED_DATETIME,t4.BACK_QUANTITY,t4.BACK_EXECUTED_QUANTITY,t4.BILLING_RULE,t4.CURRENCY,t4.ESTIMA_WHO,t4.EXECUTED_QUANTITY,t4.NOTE_TYPE,t4.ORG_ID,t4.OTHER_CLAUSE,t4.PLANNED_BATCH_NO,t4.PLANNED_STORAGE_LOC,t4.PUR_ID,t4.PURCHASE_AGREEMENT_ITEM,t4.QC_RESULT_AFFECTS_BILLING,t4.QUANTITY,t4.RATIO_SAPLING,t4.LAB_COUNT,t4.TAX_CODE,t4.WEIGHT_UNIT,t3.AGREEMENT_TYPE,t3.AUDIT_BY,t3.AUDIT_FAIL_REASON,t3.AUDIT_IND,t3.BASE_PRICE,t3.BASELINE_UNIT,t3.CREATE_TYPE,t3.CURRENCY,t3.DOC_DATE,t3.EFFECTIVE_END_DATE,t3.EFFECTIVE_START_DATE,t3.NOTICE_DOC_DESC,t3.NOTICE_DOC_NO,t3.NOTICE_DOC_TYPE,t3.OPERATOR,t5.ID,t5.CREATED_BY,t5.CREATED_DATETIME,t5.DEFUNCT_IND,t5.UPDATED_BY,t5.UPDATED_DATETIME,t5.BILLING_RULE,t5.JUMP_GROUP_NO,t5.MATERIAL_DESC,t5.MATERIAL_ID,t5.ORG_ID2,t5.ORG_ID,t5.PURCHASE_FLOW,t5.PUR_ID,t5.PURCHASE_SEASON_START_DATE,t5.RATIO_OF_SAMPLINGS,t5.REQUIRED_LAB_COUNT,t5.UNIT,t3.ORIGINAL_NOTICE_DOC_NO,t3.PURCHASE_ENTITY_ID,t3.RE_AUDIT_REASON,t3.REMARKS,t6.ID,t6.CREATED_BY,t6.CREATED_DATETIME,t6.DEFUNCT_IND,t6.UPDATED_BY,t6.UPDATED_DATETIME,t6.BILLING_RULE,t6.JUMP_GROUP_NO,t6.MATERIAL_DESC,t6.MATERIAL_ID,t6.ORG_ID2,t6.ORG_ID,t6.PURCHASE_FLOW,t6.PUR_ID,t6.PURCHASE_SEASON_START_DATE,t6.RATIO_OF_SAMPLINGS,t6.REQUIRED_LAB_COUNT,t6.UNIT,t0.OPERATOR,t7.ID,t7.CREATED_BY,t7.CREATED_DATETIME,t7.DEFUNCT_IND,t7.UPDATED_BY,t7.UPDATED_DATETIME,t7.BILLING_RULE,t7.JUMP_GROUP_NO,t7.MATERIAL_DESC,t7.MATERIAL_ID,t7.ORG_ID2,t7.ORG_ID,t7.PURCHASE_FLOW,t7.PUR_ID,t7.PURCHASE_SEASON_START_DATE,t7.RATIO_OF_SAMPLINGS,t7.REQUIRED_LAB_COUNT,t7.UNIT,t0.ORIGIN,t0.OTHER_CLAUSE,t0.PLANNED_WEIGHT,t0.PRICING_DATE,t0.PURCHASE_AGREE_ITEM_NO,t0.PURCHASE_AGREE_NO,t8.ID,t8.VERSION,t8.CREATED_BY,t8.CREATED_DATETIME,t8.DEFUNCT_IND,t8.UPDATED_BY,t8.UPDATED_DATETIME,t8.AGREEMENT_PURCHASE_IND,t8.AUDIT_STATUS,t8.BILLING_STATUS,t8.CREATE_WAY,t8.DOC_CLOSE,t8.DOC_CREATE_TYPE,t8.DOC_DATE,t8.DOC_TYPE,t8.ENTR_DOC_ID,t8.EXPORT_STATUS,t8.NEED_TO_EXPORT,t8.NOTE_TYPE,t9.ID,t9.CREATED_BY,t9.CREATED_DATETIME,t9.DEFUNCT_IND,t9.UPDATED_BY,t9.UPDATED_DATETIME,t9.AGREEMENT_END_DATE,t9.AGREEMENT_START_DATE,t9.AGREEMENT_TYPE,t9.ARG_CONTRACT_NO,t9.AUDIT_BY,t9.DOC_DATE,t9.EFFECTIVE_IND,t9.MERGED_BILLING_IND,t9.NOTE_TYPE,t9.OPERATOR,t9.PURCHASE_AGREEMENT_NO,t9.PURE_ID,t9.PUR_ID,t9.REFUESD_REASON,t9.STATISTICS_GROUP_ID,t9.STATUS,t9.TOLERANCE,t9.VENDOR_ACCOUNT,t9.VENDOR_ADD_REMARKS,t9.VENDOR_NAME,t8.PURCHASE_DOC_NO,t8.PURCHASE_ENTITY_ID,t10.ID,t10.VERSION,t10.CREATED_BY,t10.CREATED_DATETIME,t10.DEFUNCT_IND,t10.UPDATED_BY,t10.UPDATED_DATETIME,t10.ADDRESS,t10.AGREEMENT_NO_COUNT,t10.BILLING_DOCUMENT_COUNT,t10.COMPANY_NO,t10.CONTACT_PERSON,t10.COORDINATE_PHONE,t10.DEFULT_TAX_CODE,t10.ENTR_ITEM_ENABLED,t10.ENTRANCE_DOCUMENT_COUNT,t10.EXCEPTION_DOCUMENT_COUNT,t10.FACTORY_NO,t10.IC_CARD_ENABLED,t10.NOTICE_DOCUMENT_COUNT,t10.PURCHASE_DOCUMENT_COUNT,t10.PURCHASE_GROUP,t10.PURCHASE_LOCATION_NAME,t10.PURCHASE_LOCATION_NO,t10.PURCHASE_ORG,t10.QC_DOCUMENT_COUNT,t10.RECEIPT_PLAN_ENABLED,t10.TELEPHONE_NO,t10.WEIGHT_BRIDGE_COUNT,t8.STATISTICS_GROUP_ID,t11.ID,t11.CREATED_BY,t11.CREATED_DATETIME,t11.DEFUNCT_IND,t11.UPDATED_BY,t11.UPDATED_DATETIME,t11.EFFECTIVE_IND,t11.ORIGINAL_SYSTEM,t11.ORIGINAL_VENDOR_NO,t11.REG_CITY,t11.REG_COUNTRY,t11.REG_PROVINCE,t11.REG_STREET_ADDRESS,t11.TAXPAYER_NO,t11.VENDOR_ACCOUNT,t11.VENDOR_NAME,t11.VENDOR_TYPE,t0.PURCHASE_DOC_ITEM,t0.PURCHASE_DOC_ITEM_NO,t0.QC_RESULT_AFFECTS_BILLING,t0.REASON_FOR_ACCEPTING,t0.SAP_DOC_NO,t0.SAP_FAILT_REASON,t0.SKIN_WEIGHT,t0.STATUS,t0.TALLY_BOOK_DATE,t0.TAX_CODE,t0.TOLERANCE,t0.TRANS_EXPORT_STATUS,t0.WEIGHT_BRIDGE_WEIGHT,t0.WEIGHT_UNITFROMDB2IPMS.PURCHASE_DOC_ITEMt0LEFTOUTERJOINDB2IPMS.AGREEMENT_ITEMt1ONt0.AGR_ID=t1.IDLEFTOUTERJOINDB2IPMS.ORG_MATERIALt2ONt0.REAL_ORG_ID=t2.IDLEFTOUTERJOINDB2IPMS.NOTICE_DOCt3ONt0.NOT_ID=t3.IDLEFTOUTERJOINDB2IPMS.ORG_MATERIALt6ONt0.OLD_ORG_ID=t6.IDLEFTOUTERJOINDB2IPMS.ORG_MATERIALt7ONt0.ORG_ID=t7.IDLEFTOUTERJOINDB2IPMS.PURCHASE_DOCt8ONt0.PUR_ID=t8.IDLEFTOUTERJOINDB2IPMS.AGREEMENT_ITEMt4ONt3.AGR_ID=t4.IDLEFTOUTERJOINDB2IPMS.ORG_MATERIALt5ONt3.ORG_ID=t5.IDLEFTOUTERJOINDB2IPMS.PURCHASE_AGREEMENTt9ONt8.PUR_ID2=t9.IDLEFTOUTERJOINDB2IPMS.PURCHASE_LOCt10ONt8.PUR_ID=t10.IDLEFTOUTERJOINDB2IPMS.VENDORt11ONt8.VEN_ID=t11.IDWHEREt0.BIL_ID=?[params=?]}[code=-911,state=40001]atorg.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:281)atorg.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.wrap(LoggingConnectionDecorator.java:265)atorg.apache.openjpa.lib.jdbc.LoggingConnectionDecorator.access$700(LoggingConnectionDecorator.java:72)

时间: 2024-11-03 03:57:12

调用XA操作异常,无法重新创建事务参与者的 XAResource的相关文章

C#异常:线程间操作无效: 从不是创建控件“xxx”的线程访问它

C# WinForm开发中,这是一个比较常见的异常:线程间操作无效,从不是创建控件"xxx"的线程访问它.这个异常来源于.NET2的一个限制:工作线程不能访问窗口线程创建的控件.解决方法主要有两种,一种是在窗口线程中设置CheckForIllegalCrossThreadCalls = false :另一种方式比较麻烦,使用委托的方式调用Invoke方法. 比如窗口中有一个button1,我要新建一个线程访问到button1.第一种方式是:  代码如下 复制代码 this.button

Spring事务——使用TransactionProxyFactoryBean创建事务代理

    Spring同时支持编程式事务策略和声明式事务策略,大部分时候,我们都推荐采用声明式事务策略.使用声明式事务策略的优势十分明显: 声明式事务能大大降低开发者的代码书写量,而且声明式事务几乎不影响应用的代码.因此,不论底层事务策略如何变化,应用程序都无需任何改变 应用程序代码无需任何事务处理代码,可以更专注于业务逻辑的实现 Spring可对任何POJO的方法提供事务管理,而且Spring的声明式事务管理无需容器的支持,可在任何环境下使用 EJB的CMT无法提供声明式回滚规则:而通过配置文件

软件事务内存导论(四)创建事务

创建事务 我们创建事务的目的是为了协调针对多个托管引用的变更.事务将会保证这些变更是原子的,也就是说,所有的托管引用要么全部被提交要么全部被丢弃,所以在事务之外我们将不会看到有任何局部变更(partial changes)出现.此外,我们也可以用创建事务的方式来解决对单个ref先读后写所引发的相关问题. Akka是用Scala开发出来的,所以如果我们工作中用的是Scala的话,就可以直接幸福地享用Akka简洁明了的API了.对于那些日常工作中不能使用Scala开发的程序员,Akka同样也提供了一

WCF分布式开发常见错误(14):无效的操作异常,At least one operation on the .

WCF事务编程过程中,会出现这个操作无效异常.信息如下: At least one operation on the 'WCFServiceTransaction1' contract is configured with the TransactionFlowAttribute attribute set to Mandatory but the channel's binding 'NetTcpBinding' is not configured with a TransactionFlow

java-SSH Action 动态调用 参数 404异常

问题描述 SSH Action 动态调用 参数 404异常 1. 异常情况: 1. There is no Action mapped for namespace [/dd] and action name [laladList] associated with context path [/baee]. - [unknown location] 1. at com.opensymphony.xwork2.DefaultActionProxy.prepare(DefaultActionProxy

环信群组解散后 部分成员登录后还是会调用 然后出异常了 按理来说不应该调用chatgroups/已经解散的群组id

问题描述 环信群组解散后  部分成员登录后还是会调用  然后出异常了   按理来说不应该调用chatgroups/已经解散的群组id eg:http://182.92.228.160:80/app/chatgroups/1459810176900?version=v2  HTTP/1.1 404 Not FoundServer: Tengine/2.0.3Date: Fri, 08 Apr 2016 02:45:45 GMTContent-Type: application/json;chars

javaweb-网页调用ocx控件打开或创建注册表的权限问题

问题描述 网页调用ocx控件打开或创建注册表的权限问题 在某几个win7 64位笔记本上, 通过服务器页面调用ocx读取注册表会提示无权限的现象,但使用本地html文件调用没问题, 不知是何原因,求大侠给点提示 解决方案 又试了一下,使用世界之窗浏览器可以正常使用了.但不明白为何? 解决方案二: ie本地file协议浏览(intranet)和http访问(internet)使用的是不同的安全设置,你按照本地的intranet安全配置internet安全设置 不过你这种需求没什么意义,只能针对特殊

调用dll文件,本应该创建该文件,但是在指定文件夹中并未显示出该文件

问题描述 调用dll文件,本应该创建该文件,但是在指定文件夹中并未显示出该文件 string a= "D://nihao.docx"; Char[] result = new Char[1024]; int check; check = CPPDLL.createCombinationFile(a.ToCharArray()); //创建该文件,成功返回0,运行时返回0,但在指定目录下并未出现该文件 check = CPPDLL.writeCombinationFile(a.ToCha

axis-多线程调用Axis客户端异常问题请教

问题描述 多线程调用Axis客户端异常问题请教 相同版本程序大部分时间可以正常运行(一直为bug不规律出现烦恼,提升并发线程数量不会增加其出现频率,至今出现2次), 偶尔启动运行抛出以下异常(不存在参数个数不匹配问题).下附异常信息与代码片段: javax.xml.rpc.JAXRPCException: Number of parameters passed in (1) doesn't match the number of IN/INOUT parameters (2) from the