seata支持多数据源事务回滚吗,这边使用sqlserver + mysql 进行业务处理,出现异常

Blade 未结 1 1078
82822406
82822406 剑圣 2021-04-30 12:41

org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.executor.ExecutorException: Error preparing statement.  Cause: io.seata.common.loader.EnhancedServiceNotFoundException: not found service provider for : io.seata.sqlparser.druid.SQLOperateRecognizerHolder

 at org.mybatis.spring.MyBatisExceptionTranslator.translateExceptionIfPossible(MyBatisExceptionTranslator.java:96)

 at org.mybatis.spring.SqlSessionTemplate$SqlSessionInterceptor.invoke(SqlSessionTemplate.java:441)

 at com.sun.proxy.$Proxy167.insert(Unknown Source)

 at org.mybatis.spring.SqlSessionTemplate.insert(SqlSessionTemplate.java:272)

 at com.baomidou.mybatisplus.core.override.MybatisMapperMethod.execute(MybatisMapperMethod.java:60)

 at com.baomidou.mybatisplus.core.override.MybatisMapperProxy$PlainMethodInvoker.invoke(MybatisMapperProxy.java:148)

 at com.baomidou.mybatisplus.core.override.MybatisMapperProxy.invoke(MybatisMapperProxy.java:89)

 at com.sun.proxy.$Proxy168.insertPlatformInfo(Unknown Source)

 at org.springblade.pushData.service.impl.PushServiceImpl.dataPushJS(PushServiceImpl.java:379)

 at org.springblade.pushData.service.impl.PushServiceImpl.startPush(PushServiceImpl.java:279)

 at org.springblade.pushData.service.impl.PushServiceImpl$$FastClassBySpringCGLIB$$1943f663.invoke(<generated>)

 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)

 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)

 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)

 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.proceed(CglibAopProxy.java:749)

 at org.springframework.transaction.interceptor.TransactionAspectSupport.invokeWithinTransaction(TransactionAspectSupport.java:367)

 at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:118)

 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodI

该怎么解决?

1条回答
  • 2021-04-30 17:46

    seata目前对mysql支持比较好,如果是sqlserver+mysql应该会有问题,你尝试着给官方发一个issue吧。

    这种场景我推荐最好从设计上规避不同数据库直接的分布式事务,分布式事务正常开发已经要想办法规避了,能不用就不用,现在再来个不同种类数据库就更麻烦了。

    0 讨论(0)
提交回复