This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Other Java Products and Servers and the fly likes AtomIkos (Open source Transaction Manager) & Tomcat 6.0 raised an exception Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Other Java Products and Servers
Bookmark "AtomIkos (Open source Transaction Manager) & Tomcat 6.0 raised an exception" Watch "AtomIkos (Open source Transaction Manager) & Tomcat 6.0 raised an exception" New topic
Author

AtomIkos (Open source Transaction Manager) & Tomcat 6.0 raised an exception

Mihir K Parekh
Greenhorn

Joined: Jul 20, 2012
Posts: 11
Hello All


I am using tomcat 6.0 and Atomikos as transaction manager. everything wroks fine but when i do commit for insertion or updation it throws following exception. i did steps described as atomikos forum also. these are written below.

A workaround can be setting the following property in jta.properties:

com.atomikos.icatch.serial_jta_transactions=false

Also, make sure to set the following property on the MySQL datasource:

pinGlobalTxToPhysicalConnection="true"

but still it throws below error.

XA resource 'jdbc/dbhlservice': resume for XID '3139322E3136382E312E322E746D30303030323030303231:3139322E3136382E312E322E746D32' raised -5: invalid arguments were given for the XA operation
Mysql Version

mysql Ver 14.12 Distrib 5.0.45, for Win32 (ia32)

below is complete stack tarce.

com.atomikos.datasource.ResourceException: XA resource 'jdbc/dbhlservice': resume for XID '3139322E3136382E312E322E746D30303030323030303231:3139322E3136382E312E322E746D32' raised -5: invalid arguments were given for the XA operation at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:505) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.(BranchEnlistedStateHandler.java:59) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:65) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:208) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:142) at $Proxy1.prepareStatement(Unknown Source) at com.vs.framework.util.JDBCUtility.executePreparedStatement(JDBCUtility.java:286) at com.vs.framework.util.JDBCUtility.executeInsert(JDBCUtility.java:263) at com.vs.framework.blf.BaseBusinessObject.insert(BaseBusinessObject.java:115) at com.vs.framework.blf.BaseBusinessObject.save(BaseBusinessObject.java:137) at com.dbhl.app.service.CreatePartServiceImpl.doService(CreatePartServiceImpl.java:59) at com.vs.framework.service.BlfServiceAtomIkosBean.doService(BlfServiceAtomIkosBean.java:96) at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:34) at com.dbhl.app.presentation.action.CreatePartAction.execute(CreatePartAction.java:114) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) Nested exception is: com.mysql.jdbc.jdbc2.optional.MysqlXAException: XAER_INVAL: Invalid arguments (or unsupported command) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.mapXAExceptionFromSQLException(MysqlXAConnection.java:600) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.dispatchCommand(MysqlXAConnection.java:583) at com.mysql.jdbc.jdbc2.optional.MysqlXAConnection.start(MysqlXAConnection.java:523) at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:498) at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.(BranchEnlistedStateHandler.java:59) at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.java:65) at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88) at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179) at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:208) at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:142) at $Proxy1.prepareStatement(Unknown Source) at com.vs.framework.util.JDBCUtility.executePreparedStatement(JDBCUtility.java:286) at com.vs.framework.util.JDBCUtility.executeInsert(JDBCUtility.java:263) at com.vs.framework.blf.BaseBusinessObject.insert(BaseBusinessObject.java:115) at com.vs.framework.blf.BaseBusinessObject.save(BaseBusinessObject.java:137) at com.dbhl.app.service.CreatePartServiceImpl.doService(CreatePartServiceImpl.java:59) at com.vs.framework.service.BlfServiceAtomIkosBean.doService(BlfServiceAtomIkosBean.java:96) at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:34) at com.dbhl.app.presentation.action.CreatePartAction.execute(CreatePartAction.java:114) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619) com.vs.framework.exception.ValidationException: XA resource 'jdbc/dbhlservice': resume for XID '3139322E3136382E312E322E746D30303030323030303231:3139322E3136382E312E322E746D32' raised -5: invalid arguments were given for the XA operation at com.vs.framework.util.JDBCUtility.executePreparedStatement(JDBCUtility.java:320) at com.vs.framework.util.JDBCUtility.executeInsert(JDBCUtility.java:263) at com.vs.framework.blf.BaseBusinessObject.insert(BaseBusinessObject.java:115) at com.vs.framework.blf.BaseBusinessObject.save(BaseBusinessObject.java:137) at com.dbhl.app.service.CreatePartServiceImpl.doService(CreatePartServiceImpl.java:59) at com.vs.framework.service.BlfServiceAtomIkosBean.doService(BlfServiceAtomIkosBean.java:96) at com.vs.framework.service.BlfServiceAtomIkosBean.executeService(BlfServiceAtomIkosBean.java:34) at com.dbhl.app.presentation.action.CreatePartAction.execute(CreatePartAction.java:114) at org.apache.struts.chain.commands.servlet.ExecuteAction.execute(ExecuteAction.java:58) at org.apache.struts.chain.commands.AbstractExecuteAction.execute(AbstractExecuteAction.java:67) at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:619)
 
 
subject: AtomIkos (Open source Transaction Manager) & Tomcat 6.0 raised an exception