1 Reply Latest reply on Jul 2, 2015 11:58 AM by Wolfgang Mayer

    XA Connection issue with MariaDB

    em ay Newbie

      I am having following issue with mariaDB jar

       

       

      12:42:54,194 ERROR [org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl] (Periodic Recovery) IJ000906: Error during crash recovery: java:jboss/datasources/myDS (Could not create connection): javax.resource.ResourceException: Could not create connection
              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:525)
              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1.run(XAManagedConnectionFactory.java:416)
              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory$1.run(XAManagedConnectionFactory.java:413)
              at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.8.0_45]
              at javax.security.auth.Subject.doAs(Subject.java:422) [rt.jar:1.8.0_45]
              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.createManagedConnection(XAManagedConnectionFactory.java:412)
              at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.open(XAResourceRecoveryImpl.java:343)
              at org.jboss.jca.core.tx.jbossts.XAResourceRecoveryImpl.getXAResources(XAResourceRecoveryImpl.java:170)
              at com.arjuna.ats.internal.jbossatx.jta.XAResourceRecoveryHelperWrapper.getXAResources(XAResourceRecoveryHelperWrapper.java:51) [jbossjts-integration-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1 (revision: ede35097ddd6c0f539ba06e78df7794c0e06d68d)]
              at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.resourceInitiatedRecoveryForRecoveryHelpers(XARecoveryModule.java:510) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
              at com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule.periodicWorkFirstPass(XARecoveryModule.java:176) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
              at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.doWorkInternal(PeriodicRecovery.java:747) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
              at com.arjuna.ats.internal.arjuna.recovery.PeriodicRecovery.run(PeriodicRecovery.java:375) [jbossjts-jacorb-4.17.29.Final-redhat-1.jar:4.17.29.Final-redhat-1]
      Caused by: java.lang.ClassCastException: org.mariadb.jdbc.Driver cannot be cast to javax.sql.XADataSource
              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXADataSource(XAManagedConnectionFactory.java:647)
              at org.jboss.jca.adapters.jdbc.xa.XAManagedConnectionFactory.getXAManagedConnection(XAManagedConnectionFactory.java:508)
              ... 12 more
      

       

      I downloaded mariadb-java-client-1.1.9 from mariadb website and create following module.xml file which is placed in jboss_home\modules\org\mariadb\main

       

       

      <?xml version="1.0" encoding="UTF-8"?>  
      <module xmlns="urn:jboss:module:1.0" name="org.mariadb">
        <resources>
        <resource-root path="mariadb-java-client-1.1.9.jar"/>
        </resources>
        <dependencies>
        <module name="javax.api"/>
        <module name="javax.transaction.api"/>
        </dependencies>  
      </module>  
      

       

       

       

      Here is my standalone.xml

       

       

      Thanks