You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A specific issue occurs when using Spring Boot Maven Plugin 1.3.8.RELEASE or earlier with Dubbo, where SPI-based filters like OpenTelemetryServerFilter fail to load. This is caused by an incompatibility in the LaunchedURLClassLoader implementation of older Spring Boot versions.
Problem Analysis:
The issue arises due to the way resources are loaded via SPI (Service Provider Interface) in Dubbo. Here's the breakdown:
Resource Lookup Failure:
In Spring Boot Maven Plugin 1.3.8.RELEASE or earlier, the LaunchedURLClassLoader overrides getResource() in a way that skips the parent classloader (AppClassLoader):
Faulty Code: LaunchedURLClassLoader.java#L71-L77.
Line 74 explicitly avoids delegating to the parent, which breaks the expected resource lookup path.
Fix:
The Spring team resolved this in Spring Boot 1.4.x by ensuring parent classloaders are properly queried. Commit Fix.
Steps to reproduce
Use spring-boot-maven-plugin 1.3.8.RELEASE or earlier to produce a jar of Dubbo's demo.
We can see related filters cannot be loaded.
Expected behavior
Use spring-boot-maven-plugin 1.3.8.RELEASE or earlier to produce a jar of Dubbo's demo, Dubbo’s related filters can be loaded successfully.
Actual behavior
Use spring-boot-maven-plugin 1.3.8.RELEASE or earlier to produce a jar of Dubbo's demo, we can see related filters cannot be loaded.
Javaagent or library instrumentation version
2.14.0
Environment
JDK: JDK 1.8 OS: Linux
Additional context
Workaround: Upgrade to Spring Boot Maven Plugin 1.4.x or later.
The text was updated successfully, but these errors were encountered:
steverao
changed the title
Dubbo‘s filters cannot be loaded when use spring-boot-maven-plugin 1.3.8.RELEASE and before
Dubbo Filters Failing to Load in Spring Boot Maven Plugin Versions 1.3.8.RELEASE or earlier
Mar 31, 2025
Describe the bug
A specific issue occurs when using Spring Boot Maven Plugin 1.3.8.RELEASE or earlier with Dubbo, where SPI-based filters like OpenTelemetryServerFilter fail to load. This is caused by an incompatibility in the LaunchedURLClassLoader implementation of older Spring Boot versions.
Problem Analysis:
The issue arises due to the way resources are loaded via SPI (Service Provider Interface) in Dubbo. Here's the breakdown:
The OpenTelemetry filters are registered via SPI in the file:
META-INF/org.apache.dubbo.rpc.Filter.
This is managed by the instrumentation module here:
DubboInstrumentationModule.java#L32-L36.
The Javaagent instruments ClassLoader.getResources() to inject these resources:
ResourceInjectionInstrumentation.java#L80-L113.
In Spring Boot Maven Plugin 1.3.8.RELEASE or earlier, the LaunchedURLClassLoader overrides getResource() in a way that skips the parent classloader (AppClassLoader):
Faulty Code:
LaunchedURLClassLoader.java#L71-L77.
Line 74 explicitly avoids delegating to the parent, which breaks the expected resource lookup path.
Fix:
The Spring team resolved this in Spring Boot 1.4.x by ensuring parent classloaders are properly queried.
Commit Fix.
Steps to reproduce
spring-boot-maven-plugin
1.3.8.RELEASE or earlier to produce a jar of Dubbo's demo.Expected behavior
Use
spring-boot-maven-plugin
1.3.8.RELEASE or earlier to produce a jar of Dubbo's demo, Dubbo’s related filters can be loaded successfully.Actual behavior
Use
spring-boot-maven-plugin
1.3.8.RELEASE or earlier to produce a jar of Dubbo's demo, we can see related filters cannot be loaded.Javaagent or library instrumentation version
2.14.0
Environment
JDK: JDK 1.8
OS: Linux
Additional context
Workaround: Upgrade to Spring Boot Maven Plugin 1.4.x or later.
The text was updated successfully, but these errors were encountered: