当前位置:Gxlcms > 数据库问题 > atomikos分布式事务报错:The class 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource' specified by property 'xaDataSourceClassName' could not be found in the classpath

atomikos分布式事务报错:The class 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource' specified by property 'xaDataSourceClassName' could not be found in the classpath

时间:2021-07-01 10:21:17 帮助过:3人阅读

大侠你的类写错了,mysql 8以上要用新的类:
xaDataSourceClassName: com.mysql.cj.jdbc.MysqlXADataSource

现在很多教程都用的mysql 5.x版本,在mysql配置上面有很多都和现在的8.x不一样,比如这个atomikos,还比如mysql驱动上要加cj等等。而且不一定只加cj就行了,比如atomikos老版本写法:
xaDataSourceClassName: com.mysql.jdbc.jdbc2.optional.MysqlXADataSource

atomikos分布式事务报错:The class 'com.mysql.jdbc.jdbc2.optional.MysqlXADataSource' specified by property 'xaDataSourceClassName' could not be found in the classpath

标签:版本   data   很多   事务   specified   com   mysq   nal   jdbc   

人气教程排行