org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:s

1 篇文章 0 订阅
1 篇文章 0 订阅

使用 jBoss + Oracle  使用  oracle-xa-ds.xml 进行分布式事务处理

我们会进行 配置 2到多个数据库  在启动jBoss时会报:

org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.jca:service=OracleXAExceptionFormatter

jBoss内容:

--- Incompletely deployed packages ---
org.jboss.deployment.DeploymentInfo@9dc2668e { url=file:/G:/jboss-4.2.3.GA/server/CE/deploy/Objst1DSXA-ds.xml }
deployer: org.jboss.deployment.XSLSubDeployer@3b100c
status: Deployment FAILED reason: Trying to install an already registered mbean: jboss.jca:service=OracleXAExceptionFormatter
state: FAILED
watch: file:/G:/jboss-4.2.3.GA/server/CE/deploy/Objst1DSXA-ds.xml
altDD: null
lastDeployed: 1259016129625
lastModified: 1259016129609
mbeans:

原因:

When creating datasources using the P8 Configuration Manager and executing the 'Configure JDBC Data Sources' task, two data source files (one XA and one non-XA) are placed into the deployed JBoss server. The XA data source files will contain the following lines:

  • <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter" 
    name="jboss.jca:service=OracleXAExceptionFormatter"> 
    <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends> 
    </mbean>

Only one XA data source file can contain the above entry. The problem occurs when more than one XA data source file contains this entry. 

All XA datasource files created by the P8 Configuration Manager utility will have the "mbean code" entry in the file. This entry will need to be removed from all XA datasource files that were created by the P8 Configuration Manager utility after the GCD XA datasource file was created. It should remain in the GCD XA data source file because that is the first XA datasource file to be created and it should be in one of the files.

!!!!!!!!!!!!!!!!!!!

解决方案:

将你所配置的数据库文件 如:oracle1-xa-ds.xml、oracle2-xa-ds.xml、oracle3-xa-ds.xml .......

jBoss只能正常加载一个 所以之后的 *.xml都会报以上错误

我们只要将  第2-n个*.xml 的内容删除:

  <mbean code="org.jboss.resource.adapter.jdbc.vendor.OracleXAExceptionFormatter" 
         name="jboss.jca:service=OracleXAExceptionFormatter">
    <depends optional-attribute-name="TransactionManagerService">jboss:service=TransactionManager</depends>
  </mbean>

再重启jBoss

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值