apache / apache/incubator-seata
求助:mybatisplus多数据源TCC模式 useTCCFence = true时调用服务时出现空指针异常
- Dominant language
- Java
- Stars
- 26k
- Forks
- 8.8k
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 4
Description
- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.
### Ⅰ.java.lang.NullPointerException: null
private static DataSource dataSource;
private static TransactionTemplate transactionTemplate; 断点这两个属性都是为null
### Ⅱ. Describe what happened
If there is an exception, please attach the exception trace:
```
Just paste your stack trace here!
```
### Ⅲ. Describe what you expected to happen
### Ⅳ. How to reproduce it (as minimally and precisely as possible)
1. xxx
2. xxx
3. xxx
Minimal yet complete reproducer code (or URL to code):
### Ⅴ. Anything else we need to know?
### Ⅵ. Environment:
- JDK version(e.g. `java -version`):
- Seata client/server version:
- Database version:
- OS(e.g. `uname -a`):
- Others:
Contributor guide
Research direction
Start by obtaining the missing exception trace, reproduction steps, and environment details requested in the issue. Then inspect the initialization path for the static dataSource and transactionTemplate fields while reproducing the MyBatis-Plus multi-data-source TCC case with useTCCFence enabled; done means the service call no longer produces a null pointer exception.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend, distributed-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100