Bug #40591 XAER_INVAL: Invalid arguments (or unsupported command)
Submitted: 8 Nov 2008 16:31 Modified: 21 Dec 2008 9:47
Reporter: Zina BOUSHIH Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: Errors Severity:S1 (Critical)
Version:MySQL 5.0.67 OS:Microsoft Windows
Assigned to: CPU Architecture:Any
Tags: Invalid arguments were given start() failed on resource, XAER_INVAL: Invalid arguments (or unsupported command)

[8 Nov 2008 16:31] Zina BOUSHIH
Description:
I am deploying a java/j2ee application ear on the server Weblogic using MySQL DB.
One of my processes is very heavy and needs a sequence from the data base.
When executing exactly this query: 
update ObjectSequencer_ set val_ = 213 where ((name_ = 'AccMsg') and (val_ = 212))
I have this bug on the server:
Nov 5, 2008 7:57:28 PM |Mortgage-[ExecuteThread: '13' for queue: 'weblogic.kernel.Default']default:Update Count: 1
Nov 5, 2008 7:57:28 PM |Mortgage-[ExecuteThread: '13' for queue: 'weblogic.kernel.Default']default:Data Source: DataSource
Nov 5, 2008 7:57:28 PM |Mortgage-[ExecuteThread: '13' for queue: 'weblogic.kernel.Default']default:com.palmyra.arch.datastore.foundation.exceptions.PhysicalDataStoreResourceException: 
java.sql.SQLException: XA error: XAER_INVAL : Invalid arguments were given start() failed on resource 'Mortgage_DataSourcePool': XAER_INVAL : Invalid arguments were given
com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_INVAL: Invalid arguments (or unsupported command)
	at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:602)
	at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:585)
	at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:525)
	at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
	at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1075)
	at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1007)
	at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:218)
	at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
	at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
	at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1250)
	at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
	at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
	at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)

How to repeat:
java.sql.SQLException: XA error: XAER_INVAL : Invalid arguments were given start() failed on resource 'Mortgage_DataSourcePool': XAER_INVAL : Invalid arguments were given
com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_INVAL: Invalid arguments (or unsupported command)
	at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:602)
	at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:585)
	at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:525)
	at weblogic.jdbc.jta.DataSource.start(DataSource.java:617)
	at weblogic.transaction.internal.XAServerResourceInfo.start(XAServerResourceInfo.java:1075)
	at weblogic.transaction.internal.XAServerResourceInfo.xaStart(XAServerResourceInfo.java:1007)
	at weblogic.transaction.internal.XAServerResourceInfo.enlist(XAServerResourceInfo.java:218)
	at weblogic.transaction.internal.ServerTransactionImpl.enlistResource(ServerTransactionImpl.java:419)
	at weblogic.jdbc.jta.DataSource.enlist(DataSource.java:1287)
	at weblogic.jdbc.jta.DataSource.refreshXAConnAndEnlist(DataSource.java:1250)
	at weblogic.jdbc.jta.DataSource.getConnection(DataSource.java:385)
	at weblogic.jdbc.jta.DataSource.connect(DataSource.java:343)
	at weblogic.jdbc.common.internal.RmiDataSource.getConnection(RmiDataSource.java:305)

Suggested fix:
I think, mysql transaction is closed before the end of my "long" process.
When I do the same request at MySQL browser, it is executed successfully. But within the process, it bugs.
The problem disappears when I use a non-transactionnal driver (org.gjt.mm.mysql.Driver) instead of the transactionnal one: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource
But my data base becomes then non-transactionnal, it does not solve the problem...
[9 Nov 2008 7:45] Valeriy Kravchuk
Thank you for a problem report. What exact version of Connector/J do you use?
[11 Nov 2008 15:22] Zina BOUSHIH
Thank you for your prompt response.
I am using the 5.1.6 version of mysql connector.
[21 Nov 2008 9:47] Sveta Smirnova
Thank you for the feedback.

Please check if your case is duplicate of bug #17343
[22 Dec 2008 0:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".