MySQL Forums
Forum List  »  Connector/JDBC and Java

MysqlXAException: Could not retrieve transation read-only status server
Posted by: Arpan Patro
Date: October 30, 2017 08:17AM

Hi,

We are facing this error intermittently. If we re-deploy the code then it works fine. Weird part is that the first transaction after a long period of no activity fails and after that all the transactions go through smoothly.

Help is appreciated. Let me know if more details are needed.

Trace:
2017-10-27 11:12:40.713 c.a.d.x.XAResourceTransaction [WARN] (R4L2FinalBolt:3:06e76ea181f74a60abcbe8b7ce16ea31) XA resource 'XXX': resume for XID '3139322E3136382E34302E3134322E746D313530393038323936303730383030303135:3139322E3136382E34302E3134322E746D3135' raised 0: unknown
com.mysql.jdbc.jdbc2.optional.MysqlXAException: Could not retrieve transation read-only status server
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:608) ~[stormjar.jar:?]
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:587) ~[stormjar.jar:?]
at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:527) ~[stormjar.jar:?]
at com.mysql.jdbc.jdbc2.optional.SuspendableXAConnection.start(SuspendableXAConnection.java:181) ~[stormjar.jar:?]
at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:297) [stormjar.jar:?]
at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.<init>(BranchEnlistedStateHandler.java:40) [stormjar.jar:?]
at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:46) [stormjar.jar:?]
at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:70) [stormjar.jar:?]
at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:160) [stormjar.jar:?]
at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:207) [stormjar.jar:?]
at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:122) [stormjar.jar:?]
at com.sun.proxy.$Proxy71.prepareStatement(Unknown Source) [?:?]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$5.doPrepare(StatementPreparerImpl.java:162) [stormjar.jar:?]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl$StatementPreparationTemplate.prepareStatement(StatementPreparerImpl.java:186) [stormjar.jar:?]
at org.hibernate.engine.jdbc.internal.StatementPreparerImpl.prepareQueryStatement(StatementPreparerImpl.java:160) [stormjar.jar:?]
at org.hibernate.loader.Loader.prepareQueryStatement(Loader.java:1884) [stormjar.jar:?]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1861) [stormjar.jar:?]
at org.hibernate.loader.Loader.executeQueryStatement(Loader.java:1838) [stormjar.jar:?]
at org.hibernate.loader.Loader.doQuery(Loader.java:909) [stormjar.jar:?]
at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:354) [stormjar.jar:?]
at org.hibernate.loader.Loader.doList(Loader.java:2553) [stormjar.jar:?]
at org.hibernate.loader.Loader.doList(Loader.java:2539) [stormjar.jar:?]
at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2369) [stormjar.jar:?]
at org.hibernate.loader.Loader.list(Loader.java:2364) [stormjar.jar:?]
at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:496) [stormjar.jar:?]
at org.hibernate.hql.internal.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:387) [stormjar.jar:?]
at org.hibernate.engine.query.spi.HQLQueryPlan.performList(HQLQueryPlan.java:231) [stormjar.jar:?]
at org.hibernate.internal.SessionImpl.list(SessionImpl.java:1264) [stormjar.jar:?]
at org.hibernate.internal.QueryImpl.list(QueryImpl.java:103) [stormjar.jar:?]

Options: ReplyQuote


Subject
Written By
Posted
MysqlXAException: Could not retrieve transation read-only status server
October 30, 2017 08:17AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.