Skip to content

Changed classloader to fixed the problem that classes cannot be loaded in the tomcat scenario#1733

Merged
Sherlockhan merged 1 commit intosermant-io:developfrom
chengyouling:develop-spi
Mar 18, 2025
Merged

Changed classloader to fixed the problem that classes cannot be loaded in the tomcat scenario#1733
Sherlockhan merged 1 commit intosermant-io:developfrom
chengyouling:develop-spi

Conversation

@chengyouling
Copy link
Copy Markdown
Collaborator

@chengyouling chengyouling commented Jan 7, 2025

What type of PR is this?

Bug

What this PR does / why we need it?

fixed class load failed when have no ContextClassLoader.

Which issue(s) this PR fixes?

#1732

Does this PR introduce a user-facing change?

No

Checklist

  • Make sure there is a GitHub_issue related with this PR before you start working on it.
  • Make sure you have squashed your change to one single commit.
  • GitHub Actions works fine in this PR.

@chengyouling chengyouling self-assigned this Jan 7, 2025
@codecov
Copy link
Copy Markdown

codecov bot commented Jan 7, 2025

Codecov Report

Attention: Patch coverage is 8.62069% with 53 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...ant/core/plugin/classloader/PluginClassLoader.java 0.00% 7 Missing ⚠️
...o/sermant/core/classloader/ClassLoaderManager.java 33.33% 3 Missing and 1 partial ⚠️
...terceptors/httpclient/HttpClient4xInterceptor.java 0.00% 4 Missing ⚠️
...ct/FlowControlSpringConfigurationInjectDefine.java 0.00% 3 Missing ⚠️
...ribe/processor/IntegratedEventListenerAdapter.java 0.00% 2 Missing ⚠️
...ynamic/config/inject/DynamicClassInjectDefine.java 0.00% 2 Missing ⚠️
...onfig/interceptors/SpringFactoriesInterceptor.java 0.00% 2 Missing ⚠️
...lowcontrol/common/handler/retry/AbstractRetry.java 0.00% 2 Missing ⚠️
...flowcontrol/config/SpringFactoriesInterceptor.java 0.00% 2 Missing ⚠️
...rmant/loadbalancer/interceptor/UrlInterceptor.java 0.00% 2 Missing ⚠️
... and 18 more
Flag Coverage Δ Complexity Δ
unittests 27.67% <8.62%> (-0.04%) 162.00 <0.00> (+6.00) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ Complexity Δ
.../main/java/io/sermant/core/utils/ReflectUtils.java 52.19% <100.00%> (ø) 0.00 <0.00> (ø)
...rvice/dynamicconfig/nacos/NacosBufferedClient.java 52.45% <100.00%> (ø) 0.00 <0.00> (ø)
.../io/sermant/dubbo/registry/utils/ReflectUtils.java 89.87% <100.00%> (ø) 0.00 <0.00> (ø)
...agent/enhance/ClassLoaderLoadClassInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...rc/main/java/io/sermant/core/utils/ClassUtils.java 32.25% <0.00%> (ø) 0.00 <0.00> (ø)
...rmant/implement/config/SermantYamlConstructor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
.../flowcontrol/retry/ExtensionLoaderInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...cer/interceptor/RibbonLoadBalancerInterceptor.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
...rmant/dubbo/registry/utils/NamingServiceUtils.java 48.38% <0.00%> (ø) 0.00 <0.00> (ø)
...ermant/registry/config/RegistrationProperties.java 0.00% <0.00%> (ø) 0.00 <0.00> (ø)
... and 21 more

... and 30 files with indirect coverage changes

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@chengyouling chengyouling force-pushed the develop-spi branch 3 times, most recently from 64d1aef to 3abd5a1 Compare January 8, 2025 01:10
@chengyouling chengyouling force-pushed the develop-spi branch 2 times, most recently from db43da0 to 4069516 Compare February 22, 2025 02:02
@chengyouling chengyouling changed the title fix spi classloader changed classloader to fixed the problem that classes cannot be loaded in the Tomcat scenario Mar 6, 2025
@chengyouling chengyouling changed the title changed classloader to fixed the problem that classes cannot be loaded in the Tomcat scenario Changed classloader to fixed the problem that classes cannot be loaded in the tomcat scenario Mar 6, 2025
provenceee
provenceee previously approved these changes Mar 11, 2025
daizhenyu
daizhenyu previously approved these changes Mar 17, 2025
@daizhenyu daizhenyu self-requested a review March 17, 2025 02:25
@chengyouling chengyouling dismissed stale reviews from daizhenyu and provenceee via 20cdae4 March 17, 2025 03:38
@chengyouling chengyouling force-pushed the develop-spi branch 2 times, most recently from acb225f to 8cdd9dd Compare March 17, 2025 06:45
Signed-off-by: chengyouling <spadgerlin888@163.com>
@Sherlockhan Sherlockhan merged commit aebae49 into sermant-io:develop Mar 18, 2025
365 checks passed
@chengyouling chengyouling deleted the develop-spi branch May 8, 2025 07:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants