incubator-seata
incubator-seata copied to clipboard
SPI加载外部扩展class异常ClassNotFoundException
- [ ] I have searched the issues of this repository and believe that this is not a duplicate.
Ⅰ. Issue Description
使用外部扩展,SPI无法加载对应的class,抛出java.lang.ClassNotFoundException:io.seata.sqlparser.druid.dm.DmOperateRecognizerHolder
io.seata.common.loader.EnhancedServiceLoader.InnerEnhancedServiceLoader#loadFile 能够扫描到对应的META-INF/services下的自定义文件,如果将新增的扩展类放到seata-all-1.6.1.jar中可以正常使用,如果使用外部扩展则不能使用。使用到的类加载器是io.seata.sqlparser.druid.DruidIsolationClassLoader
Ⅱ. Describe what happened
Ⅲ. Describe what you expected to happen
Ⅳ. How to reproduce it (as minimally and precisely as possible)
- xxx
- xxx
- xxx
Minimal yet complete reproducer code (or URL to code):
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
- JDK version(e.g.
java -version
): 17 - Seata client/server version: 1.6.1
- Database version:
- OS(e.g.
uname -a
): - Others: