We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
使用外部扩展,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
Minimal yet complete reproducer code (or URL to code):
java -version
uname -a
The text was updated successfully, but these errors were encountered:
先临时改下包名处理吧,这个要讨论下是否去除sqlparser这个路径的加载隔离
Sorry, something went wrong.
改包名也无效,因为两者一个是业务classloader加载的视线,一个父类是DruidIsolationClassLoader加载的,无法判断实现类是接口的子类,导致类型转换异常
Successfully merging a pull request may close this issue.
Ⅰ. 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)
Minimal yet complete reproducer code (or URL to code):
Ⅴ. Anything else we need to know?
Ⅵ. Environment:
java -version
): 17uname -a
):The text was updated successfully, but these errors were encountered: