LSPS documentation logo
LSPS Documentation
Troubleshooting Data Source

XAException on Oracle 10g R2 or 11g

The server returns the following XA exception:

WARN [com.arjuna.ats.jta.logging.loggerI18N] [com.arjuna.ats.internal.jta.recovery.xarecovery1] Local XARecoveryModule.xaRecovery got XA exception javax.transaction.xa.XAException, XAException.XAER_RMERR

To remedy the situation, do the following:

  • For Oracle, make sure the Oracle user has access to the appropriate tables so they can accomplish the recovery:
    GRANT SELECT ON sys.dba_pending_transactions TO user;
    GRANT SELECT ON sys.pending_trans$ TO user;
    GRANT SELECT ON sys.dba_2pc_pending TO user;
    GRANT EXECUTE ON sys.dbms_xa TO user;

The above assumes that the user is the user defined to connect from WildFly to Oracle. It also assumes that either Oracle 10g R2 (patched for bug 5945463) or 11g is used. If an unpatched version, that is, a version older that 11g, is used, change the last GRANT EXECUTE to the following:

GRANT EXECUTE ON sys.dbms_system TO user;

Time zone 'CEST' is unrecognized in MySQL

When using MySQL, you might get the following exception when connecting:

Caused by: com.mysql.cj.exceptions.InvalidConnectionAttributeException:
The server time zone value 'CEST' is unrecognized or represents more than one time zone.
You must configure either the server or JDBC driver (via the serverTimezone configuration property)
to use a more specific time zone value if you want to utilize time zone support.

To remedy the situation, set the time zone in one of the following:

  • in the database if one timezone is required, for example, `SET GLOBAL time_zone = '+0:00';`
  • in the data source URL if multiple zones are required, for example,
    <xa-datasource-property
       name="URL">jdbc:mysql://localhost:3306/lsps?
                   useUnicode=true&amp;
                   characterEncoding=utf-8
                   &amp;useJDBCCompliantTimezoneShift=true
                   &amp;useLegacyDatetimeCode=false
                   &amp;serverTimezone=UTC
    </xa-datasource-property>