Describe the bug
When using java.net.spi.InetAddressResolverProvider, the custom SPI does not load properly.
Steps to reproduce
META-INF/services/java.net.spi.InetAddressResolverProvider: com.example.demo.MyAddressResolverProvider
java -javaagent:opentelemetry-javaagent.jar \
-jar target/demo-0.0.1-SNAPSHOT.jar

Expected behavior
Customized implementation takes effect successfully.
Actual behavior
Custom implementation does not take effect.
Javaagent or library instrumentation version
1.32.0
Environment
JDK:21
OS: Linux/MacOS
Additional context
When I use this command (without a javaagent):
java -jar target/demo-0.0.1-SNAPSHOT.jar
It's work fine.

And the classloader is correct: URLClassPath$Loader@1211
When I use this command (with javaagent):
java -javaagent:opentelemetry-javaagent.jar \
-jar target/demo-0.0.1-SNAPSHOT.jar

The classloader is incorrect: URLClassPath$JarLoader@814. The JarLoader cannot load the springboot jar; it can only load the normal Maven project jar.
And this method cannot be called org.springframework.boot.loader.launch.JarLauncher#main.
If I don't use Spring Boot instead of a normal Maven project, it'll also work fine.
Describe the bug
When using
java.net.spi.InetAddressResolverProvider, the custom SPI does not load properly.Steps to reproduce
META-INF/services/java.net.spi.InetAddressResolverProvider:
com.example.demo.MyAddressResolverProviderjava -javaagent:opentelemetry-javaagent.jar \ -jar target/demo-0.0.1-SNAPSHOT.jarExpected behavior
Customized implementation takes effect successfully.
Actual behavior
Custom implementation does not take effect.
Javaagent or library instrumentation version
1.32.0
Environment
JDK:21
OS: Linux/MacOS
Additional context
When I use this command (without a javaagent):
It's work fine.
And the classloader is correct:
URLClassPath$Loader@1211When I use this command (with javaagent):
java -javaagent:opentelemetry-javaagent.jar \ -jar target/demo-0.0.1-SNAPSHOT.jarThe classloader is incorrect:
URLClassPath$JarLoader@814. The JarLoader cannot load the springboot jar; it can only load the normal Maven project jar.And this method cannot be called
org.springframework.boot.loader.launch.JarLauncher#main.If I don't use Spring Boot instead of a normal Maven project, it'll also work fine.