HCTzz opened a new issue #13783:
URL: https://github.com/apache/shardingsphere/issues/13783


   Which version of ShardingSphere did you use?
   5.0.0 or 4.1.1
   
   Which project did you use? ShardingSphere-JDBC or ShardingSphere-Proxy?
   ShardingSphere-JDBC
   
   Expected behavior
   Seata transaction should work as expected.
   
   Actual behavior
   commit or rollback NPE
   
   
![微信图片_20211125091509](https://user-images.githubusercontent.com/24837684/143334733-da8c0855-2990-4ea0-8d69-f97563b07fe2.JPG)
   
   steps to Reproduce the issue
   service A not use shardingSphere-JDBC 
   
   @GlobalTransactional
   public void test() {
          Test wip = new Test();
          wip.setId("653672951811678208");
          wip.setOpCode("gx001");
          wip.setRotaId("1234");
          testMngService.updateWip(wip);//dubbo service B
   }
   
   service B use  shardingSphere-JDBC 
   @Transactional
   @ShardingSphereTransactionType(TransactionType.BASE)
   public void updateWip(Wip wip,String userName) {
           QueryWrapper<Test> queryWrapper = new QueryWrapper<>();
           queryWrapper.eq("PK_ID",wip.getId());
           queryWrapper.eq("OP_CODE",wip.getOpCode());
           wipDao.update(wip,queryWrapper);
   }
   
![微信图片_20211125092526](https://user-images.githubusercontent.com/24837684/143342687-9fddb0fb-cbaf-4040-9841-350522c1d0c8.JPG)
   
![微信图片_20211125092847](https://user-images.githubusercontent.com/24837684/143343200-550d65bf-4117-42c7-8b1d-db07425e0b8b.JPG)
   
![微信图片_20211125093028](https://user-images.githubusercontent.com/24837684/143344434-c8781652-7a70-46e0-8f22-2ac3dc914290.JPG)
   
   
   Hope to provide solutions
   
   
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to