1 Reply Latest reply on Dec 14, 2007 7:41 AM by Dmitry Trunikov

    XA-Datasource and MySQL Unknown Error

    Jon Bastin Newbie

      I have a JBoss Seam application which uses two datasources, one Oracle and one MySQL, requiring the use of an xa-datasource. Everything worked fine when connecting to a MySQL 5 server but when I try to connect to a MySQL 4 server, I get the following error:

      [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] [com.arjuna.ats.internal.jta.transaction.arjunacore.enliststarterror] TransactionImple.enlistResource - XAResource.start returned: [com.arjuna.ats.jta.utils.unknownerrorcode] Unknown error code:0 for < 131075, 26, 24, 1-1d060145:e81:475894cd:c81d060145:e81:475894cd:d2_
      com.mysql.jdbc.jdbc2.optional.MysqlXAException: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'XA START 0x312d31643036303134353a6538313a34373538393463643a6338

      This used the 5.0.8 J/Connector driver since the 5.1.5 version causes JBoss to hang during startup. I have read in other forums that there have been xa-datasource issues related to the driver but I haven't found anything that specifically triggers that unknown error code. My datasource is defined as follows:

      <xa-datasource-property name="URL">${tm.event.db.url}</xa-datasource-property>
      <track-connection-by-tx />

      Given I can't upgrade the MySQL server to 5.0, is there any configuration setting I can modify to get the XA SQL syntax to work with 4.0? I was hoping there was a config setting to make the SQL syntax generic enough so MySQL won't complain about it. Any help would be appreciated. Thanks.