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
Class.forName 使用的MetadataReportService 的classloader 来加载interface, 但是这个interface 可能是另外的class loader 加载的,会报找不到class.
2019-08-01 12:15:26,110 ERROR org.apache.dubbo.metadata.integration.MetadataReportService[106] - [DUBBO] publishProvider getServiceDescriptor error. providerUrl: dubbo://192.168.0.9:20880/com.wdk.SpiTes?anyhost=true&application=wdk-plugin-engine&dubbo=2.0.2&generic=false&group=dubbo&interface=com.wdk.SpiTes&methods=speak&proxy=jdk&release=2.7.1-SNAPSHOT&revision=1.0.0-SNAPSHOT&side=provider&version=1.0.0.wdk-serverless-bundle.1.0.0, dubbo version: 2.7.1-SNAPSHOT, current host: 192.168.0.9 java.lang.ClassNotFoundException: com.wdk.SpiTes
Pls. provide [GitHub address] to reproduce this issue.
What do you expected from the above steps?
What actually happens?
If there is an exception, please attach the exception trace:
Just put your stack trace here!
The text was updated successfully, but these errors were encountered:
I think I will add some code such as Thread.getContextClassLoader to fix this issue.
Thread.getContextClassLoader
You should add some code java.lang.Thread#setContextClassLoader. Please make sure you can do it.
java.lang.Thread#setContextClassLoader
Sorry, something went wrong.
yean , now I had change the code with 2.7.0 source code . use Thread context class loader
@fangxiaorui Let me know if you are interested in fixing this particular issue by submitting a pull request.
[dubbo-4712] add Thread ContextClassLoader (#4767)
165d975
fix #4712
Successfully merging a pull request may close this issue.
Environment
Steps to reproduce this issue
Class.forName 使用的MetadataReportService 的classloader 来加载interface,
但是这个interface 可能是另外的class loader 加载的,会报找不到class.
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
What do you expected from the above steps?
Actual Result
What actually happens?
If there is an exception, please attach the exception trace:
The text was updated successfully, but these errors were encountered: