org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'atomikosTransactionManager' defined in file [/home/xxx/webapps/safeWeb/WEB-INF/classes/applicationContext-database-copyClearData2.xml]: Invocation of init method failed; nested exception is java.lang.NoSuchMethodError: com.atomikos.persistence.imp.StateRecoveryManagerImp: method <init>()V not found
jar包版本不统一或者太高,idea正常运行,放到linux下就报错了,mysql5.6版本
https://stackoverflow.com/questions/41726828/unable-to-start-a-usertransaction-using-atomikos
<!--多数据源-->
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-api</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>atomikos-util</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jdbc-deprecated</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jta</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>com.atomikos</groupId>
<artifactId>transactions-jdbc</artifactId>
<version>3.8.0</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid</artifactId>
<version>1.0.15</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>jta</artifactId>
<version>1.1</version>
</dependency>

博客详细描述了在Spring框架中整合Atomikos事务管理器时遇到的问题,特别是在Linux环境下运行时出现的NoSuchMethodError异常。问题可能源于jar包版本不一致或过高,以及与MySQL 5.6版本的兼容性。文章提供了具体的依赖配置信息,包括Atomikos多个组件和Druid连接池的版本号。
5710

被折叠的 条评论
为什么被折叠?



