豆腐饭请 2015-11-05 06:17 采纳率: 0%
浏览 3072

atomikos分布式事务问题

2015-11-05 11:38:14.957 [main] ERROR
java.sql.Connection[JakartaCommonsLoggingImpl.java:19] - Error calling Connection.prepareStatement:
com.atomikos.datasource.ResourceException: XA resource 'ds2': resume for XID '636F6D2E746C772E62706D2E656E6769
6E652E61746F6D696B6F732E737072696E672E6A6462632E746D30303030313030303134:636F6D2E746C772E62706D2E656E67696E652
E61746F6D696B6F732E737072696E672E6A6462632E746D33' raised -8: the supplied XID already exists in this XA resou
rce
at com.atomikos.datasource.xa.XAResourceTransaction.resume(XAResourceTransaction.java:434) ~[transactions-jta
-3.9.1.jar:na]
at com.atomikos.datasource.xa.session.BranchEnlistedStateHandler.(BranchEnlistedStateHandler.java:59) ~
[transactions-jta-3.9.1.jar:na]
at com.atomikos.datasource.xa.session.NotInBranchStateHandler.checkEnlistBeforeUse(NotInBranchStateHandler.ja
va:64) ~[transactions-jta-3.9.1.jar:na]
at com.atomikos.datasource.xa.session.TransactionContext.checkEnlistBeforeUse(TransactionContext.java:88) ~[t
ransactions-jta-3.9.1.jar:na]
at com.atomikos.datasource.xa.session.SessionHandleState.notifyBeforeUse(SessionHandleState.java:179) ~[trans
actions-jta-3.9.1.jar:na]
at com.atomikos.jdbc.AtomikosConnectionProxy.enlist(AtomikosConnectionProxy.java:223) ~[transactions-jdbc-3.9
.1.jar:na]
at com.atomikos.jdbc.AtomikosConnectionProxy.invoke(AtomikosConnectionProxy.java:142) ~[transactions-jdbc-3.9
.1.jar:na]
at com.sun.proxy.$Proxy7.prepareStatement(Unknown Source) ~[na:na]
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45]
at org.springframework.jdbc.datasource.TransactionAwareDataSourceProxy$TransactionAwareInvocationHandler.invo
ke(TransactionAwareDataSourceProxy.java:239) ~[spring-jdbc-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at com.sun.proxy.$Proxy4.prepareStatement(Unknown Source) ~[na:na]
at sun.reflect.GeneratedMethodAccessor27.invoke(Unknown Source) ~[na:na]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) ~[na:1.6.0_45]
at java.lang.reflect.Method.invoke(Method.java:597) ~[na:1.6.0_45]
at com.ibatis.common.jdbc.logging.ConnectionLogProxy.invoke(ConnectionLogProxy.java:53) ~[ibatis-sqlmap-2.3.0
.jar:na]
at com.sun.proxy.$Proxy5.prepareStatement(Unknown Source) [na:na]
at com.ibatis.sqlmap.engine.execution.SqlExecutor.prepareStatement(SqlExecutor.java:494) [ibatis-sqlmap-2.3.0
.jar:na]
at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeUpdate(SqlExecutor.java:76) [ibatis-sqlmap-2.3.0.jar
:na]
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteUpdate(GeneralStatement.java:200) [i
batis-sqlmap-2.3.0.jar:na]
at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeUpdate(GeneralStatement.java:78) [ibati
s-sqlmap-2.3.0.jar:na]
at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.insert(SqlMapExecutorDelegate.java:447) [ibatis-sqlma
p-2.3.0.jar:na]
at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.insert(SqlMapSessionImpl.java:82) [ibatis-sqlmap-2.3.0.jar
:na]
at org.springframework.orm.ibatis.SqlMapClientTemplate$8.doInSqlMapClient(SqlMapClientTemplate.java:369) [spr
ing-orm-3.2.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:203) [spring-orm-3.2
.2.RELEASE.jar:3.2.2.RELEASE]
at org.springframework.orm.ibatis.SqlMapClientTemplate.insert(SqlMapClientTemplate.java:367) [spring-orm-3.2.
2.RELEASE.jar:3.2.2.RELEASE]

  • 写回答

3条回答 默认 最新

  • 豆腐饭请 2015-11-09 03:40
    关注

    (已经决解)
    原因:是因为多次开启事务
    在一个方法的被调用的时候开启了事务,在这个方法里面调用的另外一个方法,这个方法本身自己也开启了事务。

    评论

报告相同问题?

悬赏问题

  • ¥15 有两个非常“自以为是”烦人的问题急期待大家解决!
  • ¥30 STM32 INMP441无法读取数据
  • ¥100 求汇川机器人IRCB300控制器和示教器同版本升级固件文件升级包
  • ¥15 用visualstudio2022创建vue项目后无法启动
  • ¥15 x趋于0时tanx-sinx极限可以拆开算吗
  • ¥15 任意一个散点图自己下载其js脚本文件并做成独立的案例页面,不要作在线的,要离线状态。
  • ¥15 各位 帮我看看如何写代码,打出来的图形要和如下图呈现的一样,急
  • ¥30 c#打开word开启修订并实时显示批注
  • ¥15 如何解决ldsc的这条报错/index error
  • ¥15 VS2022+WDK驱动开发环境