JBoss XA datasources and mbean error

When deploying an application on Jboss that used Oracle and XA datasources, the following error croped up:

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

It took me a while to found out what the issue was, and the lead to the solution was that the error moved from datasource to datasource according to it’s name, namely the xml definition filename.

The issue is quite simple: XA datasources can only have one mbean definition for the OracleXAExceptionFormatter, so choose one, and only one and put the required definition:

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

Remove this definition from any other XA datasource and the error should disappear and all datasources can bound now without any errors.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s