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

來源:互聯網
上載者:User

使用 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

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.