Menu

Warning and an Exception using XA with Wildfly

Help
Cain
2014-09-08
2014-09-10
  • Cain

    Cain - 2014-09-08

    First up the warning. I seem to get this all the time.

    2014-09-08 13:38:09,110 WARN [com.arjuna.ats.jta] (Thread-7 (HornetQ-client-global-threads-1229110339)) ARJUNA016039: onePhaseCommit on < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a8158c:-20c9dd76:540de7f8:6854, node_name=1, branch_uid=0:ffffc0a8158c:-20c9dd76:540de7f8:685f, subordinatenodename=null, eis_name=unknown eis name > (org.jboss.jca.adapters.jdbc.xa.XAManagedConnection@6bfca943) failed with exception ARJUNA016099: Unknown error code:0: javax.transaction.xa.XAException: The XADataSource has no such Xid: < formatId=131077, gtrid_length=29, bqual_length=36, tx_uid=0:ffffc0a8158c:-20c9dd76:540de7f8:6854, node_name=1, branch_uid=0:ffffc0a8158c:-20c9dd76:540de7f8:685f, subordinatenodename=null, eis_name=unknown eis name >
    at org.hsqldb.jdbc.pool.JDBCXAResource.commit(JDBCXAResource.java:172) [hsqldb.jar:private-2014/09/08-10:55:29]
    at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.commit(XAManagedConnection.java:338)
    at com.arjuna.ats.internal.jta.resources.arjunacore.XAResourceRecord.topLevelOnePhaseCommit(XAResourceRecord.java:679)
    at com.arjuna.ats.arjuna.coordinator.BasicAction.onePhaseCommit(BasicAction.java:2317)
    at com.arjuna.ats.arjuna.coordinator.BasicAction.End(BasicAction.java:1475)
    at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:96)
    etc...

    And now for the exception. I don't alway see this, but with everything else going on in the log file after things go bad it might not be getting logged.

    java.lang.NullPointerException
    at org.hsqldb.map.BaseHashMap.addOrRemove(BaseHashMap.java:334)
    at org.hsqldb.lib.HashMap.put(HashMap.java:70)
    at org.hsqldb.jdbc.pool.JDBCXADataSource.addResource(JDBCXADataSource.java:157)
    at org.hsqldb.jdbc.pool.JDBCXAResource.start(JDBCXAResource.java:464)
    at org.jboss.jca.adapters.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:259)
    etc..

    Finally the wildfly data source configuration:

                <xa-datasource jndi-name="java:jboss/jdbc/realtime" pool-name="RealTimeDB" enabled="true">
                    <xa-datasource-property name="Url">
                        jdbc:hsqldb:mem:realtime;hsqldb.tx=mvcc;user=realtime;password=password
                    </xa-datasource-property>
                    <xa-datasource-property name="User">
                        realtime
                    </xa-datasource-property>
                    <xa-datasource-property name="Password">
                        password
                    </xa-datasource-property>
                    <driver>hsqldb</driver>
                    <xa-pool>
                        <min-pool-size>10</min-pool-size>
                        <max-pool-size>100</max-pool-size>
                        <prefill>true</prefill>
                        <is-same-rm-override>false</is-same-rm-override>
                        <interleaving>false</interleaving>
                        <pad-xid>false</pad-xid>
                        <wrap-xa-resource>false</wrap-xa-resource>
                    </xa-pool>
                    <security>
                        <user-name>realtime</user-name>
                        <password>password</password>
                    </security>
                    <validation>
                        <validate-on-match>false</validate-on-match>
                        <background-validation>false</background-validation>
                    </validation>
                    <statement>
                        <prepared-statement-cache-size>0</prepared-statement-cache-size>
                        <share-prepared-statements>false</share-prepared-statements>
                    </statement>
                </xa-datasource>
                <drivers>
                    <driver name="hsqldb" module="org.hsqldb">
                        <xa-datasource-class>org.hsqldb.jdbc.pool.JDBCXADataSource</xa-datasource-class>
                </drivers>
    

    Now these problems only seem to occur when there are multiple users logged into and viewing a particular section of the application. The section just happens to be the real-time section which updates once second. The update routine goes to a few tables in the in memory database and displays them to the user. If there's only one user logged in and viewing the real-time section everything is ok, but when a second user logs in a views real-time, everything falls apart. I tried turning off MVCC and that didn't seem to help.

    I don't know if the problem is with HSQLDB or Wildfly, but this was working before with H2 before we switched over.

     
  • Fred Toussi

    Fred Toussi - 2014-09-08

    The second problem is with HSQLDB and fix has been committed. The first one may be due to the other issue.

     
  • Cain

    Cain - 2014-09-10

    Yeah I'm thinking that the first one is a result of the exception. I'll try building off the head and see what happens. Is there a time frame for the next release? I quickly checked the website and didn't see a road map or anything. Thanks.

     
  • Fred Toussi

    Fred Toussi - 2014-09-10

    It is very easy to build the jar with the gradle gui app. There is no timeframe for the next release but it could happen very soon.

     

Log in to post a comment.