[CONJ-122] Raised -5: invalid arguments were given for the XA operation Created: 2014-11-17 Updated: 2014-12-09 Resolved: 2014-12-09 |
|
| Status: | Closed |
| Project: | MariaDB Connector/J |
| Component/s: | None |
| Affects Version/s: | 1.1.7 |
| Fix Version/s: | 1.1.8 |
| Type: | Bug | Priority: | Major |
| Reporter: | David Martin | Assignee: | Massimo Siani (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Environment: |
OS: Unix based |
||
| Attachments: |
|
| Description |
|
Hi, we are migrating the java db connector from mysql 5.1.18 to mariadb 1.1.7 The datasources spring configuration look as follow:
Trying to perform an XA transaction we have the following exception "invalid arguments were given for the XA operation":
This is a documented issue in Atomikos (http://www.atomikos.com/Documentation/KnownProblems#MySQL_does_not_support_TMJOIN) and it was solved with MySQL adding the following parameter to the URL connection string : &pinGlobalTxToPhysicalConnection=true After migrate the java connector to MariaDB it seems that this parameter is not available for the connector being impossible to run the application. Best regards |
| Comments |
| Comment by Massimo Siani (Inactive) [ 2014-12-02 ] | |||||||||||||
|
Hi David, could you run the XA test here please: | |||||||||||||
| Comment by David Martin [ 2014-12-02 ] | |||||||||||||
|
Hi Massimo, After downloading and running the test I have this exception trace:
This is caused by the code which tries to create a duplicate key in the xaTransaction2 table.
When that happens, we have this exception:
Using MySQL J/Connector the issue is solved setting to true the pinGlobalTxToPhysicalConnection as parameter in the connection string.
Link: http://dev.mysql.com/doc/connector-j/en/connector-j-reference-configuration-properties.html | |||||||||||||
| Comment by Massimo Siani (Inactive) [ 2014-12-04 ] | |||||||||||||
|
David, could you please test this snapshot against your code in a test environment? | |||||||||||||
| Comment by David Martin [ 2014-12-05 ] | |||||||||||||
|
Hi, I have tested the code with the new version but we still have the same issue:
Cheers | |||||||||||||
| Comment by Massimo Siani (Inactive) [ 2014-12-05 ] | |||||||||||||
|
Sorry, very basic question because I didn't tell you: did you add pinGlobalTxToPhysicalConnection=true to your url? | |||||||||||||
| Comment by David Martin [ 2014-12-05 ] | |||||||||||||
|
Good point, I didn't use the parameter. I tested again and this version solves the problem. Thanks a lot for your effort. Cheers | |||||||||||||
| Comment by Massimo Siani (Inactive) [ 2014-12-09 ] | |||||||||||||
|
Thanks David for reporting and testing. |