Replies: 1 comment 2 replies
-
|
I think we only tested this in Gateway 4.x. I am not sure how it works in your end. From reading the logs, @CzyerChen If you are still watching here, please take a look. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
JDK: 17
SpringBoot: 3.4.5
Webclient: 6.2.6
skywalking java agent: 9.5.0
I had copy the apm-spring-webflux-6.x-plugin-9.5.0.jar to plugins dir. And exclude spring-webflux-5.x-webclient-plugin-9.5.0.jar from plugins dir.
When I use webclient send requests, the agent throw NPE and log in agent log file.
How I use WebClient:
webClient.post().uri().headers().body().retrieve().bodyToFlux(String.class)
Stack:
ERROR 2025-11-20 17:09:06.511 otn-io-thread-1 InstMethodsInter : class[class org.springframework.web.reactive.function.client.DefaultClientRequestBuilder$BodyInserterRequest] before method[writeTo] intercept failure
java.lang.NullPointerException: Cannot invoke "org.apache.skywalking.apm.agent.core.context.ContextCarrier.items()" because "contextCarrier" is null
at org.apache.skywalking.apm.plugin.spring.webflux.v6.webclient.BodyInserterRequestInterceptor.beforeMethod(BodyInserterRequestInterceptor.java:37)
at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.InstMethodsInter.intercept(InstMethodsInter.java:83)
at org.springframework.web.reactive.function.client.DefaultClientRequestBuilder$BodyInserterRequest.writeTo(DefaultClientRequestBuilder.java)
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.lambda$exchange$1(ExchangeFunctions.java:103)
at org.springframework.http.client.reactive.JdkClientHttpConnector.connect(JdkClientHttpConnector.java:117)
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.$sw$original$exchange$1duusa0(ExchangeFunctions.java:103)
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.$sw$original$exchange$1duusa0$accessor$$sw$fl9sv53(ExchangeFunctions.java)
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction$$sw$auxiliary$uv3mfs1.call(Unknown Source)
at org.apache.skywalking.apm.agent.core.plugin.interceptor.enhance.v2.InstMethodsInterV2.intercept(InstMethodsInterV2.java:76)
at org.springframework.web.reactive.function.client.ExchangeFunctions$DefaultExchangeFunction.exchange(ExchangeFunctions.java)
at org.springframework.web.reactive.function.client.DefaultWebClient$ObservationFilterFunction.filter(DefaultWebClient.java:747)
at org.springframework.web.reactive.function.client.ExchangeFilterFunction.lambda$andThen$0(ExchangeFilterFunction.java:62)
at reactor.core.publisher.MonoDefer.subscribe(MonoDefer.java:45)
Beta Was this translation helpful? Give feedback.
All reactions