timpeeters opened a new pull request #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause URL: https://github.com/apache/cxf/pull/639 I believe there is an incompatibility between `cxf-integration-tracing-brave` and recent versions of `brave-instrumentation-http`. CXF master currently depends on Brave version 5.6.9 while the newest version is 5.9.4. As of version 5.7, `brave-instrumentation-http` throws a `NullPointerException` when invoking `brave.http.HttpClientHandler.create(HttpTracing, HttpClientAdapter)` with a `null` value for the `HttpClientAdapter` parameter. Which is exactly what `cxf-integration-tracing-brave` does in case of an exception/SOAP fault. This results in the following stack trace and hides the original SOAP fault from the user: ``` java.lang.NullPointerException: adapter == null at brave.http.HttpClientHandler.create(HttpClientHandler.java:64) at org.apache.cxf.tracing.brave.AbstractBraveClientProvider.stopTraceSpan(AbstractBraveClientProvider.java:126) at org.apache.cxf.tracing.brave.BraveClientStartInterceptor.handleFault(BraveClientStartInterceptor.java:55) at org.apache.cxf.phase.PhaseInterceptorChain.unwind(PhaseInterceptorChain.java:499) ``` Users of Spring Cloud Greenwich SR3 or higher are impacted. Dependency graph from left to right with indication of the impacted versions: | Spring Boot | Spring Cloud | Sleuth | Brave | Status | | ----------- | ----------------- | ------------- | ----- | ---------- | | 2.1 | Greenwich.RELEASE | 2.1.0.RELEASE | 5.6.1 | Works | | 2.1 | Greenwich.SR1 | 2.1.1.RELEASE | 5.6.1 | Works | | 2.1 | Greenwich.SR2 | 2.1.2.RELEASE | 5.6.5 | Works | | 2.1 | Greenwich.SR3 | 2.1.3.RELEASE | 5.7.0 | **Broken** | | 2.1 | Greenwich.SR4 | 2.1.6.RELEASE | 5.8.0 | **Broken** | | 2.1 | Greenwich.SR5 | 2.1.7.RELEASE | 5.9.2 | **Broken** | | 2.2 | Hoxton.RELEASE | 2.2.0.RELEASE | 5.9.0 | **Broken** | | 2.2 | Hoxton.SR1 | 2.2.1.RELEASE | 5.9.0 | **Broken** | This pull requests: - Bumps the Brave dependencies to the most recent version - Bump cxf.reporter.version from 2.10.0 to 2.12.1 - Bump cxf.brave.version from 5.6.9 to 5.9.4 - Bump cxf.brave.zipkin.version to 2.14.2 to 2.19.3 - Calls `brave.http.HttpClientHandler.create(HttpTracing), introduced in Brave 5.7 instead of `brave.http.HttpClientHandler.create(HttpTracing, HttpClientAdapter) in case of SOAP faults. The following repository reproduces the issue using the latest stable versions of Spring Boot, Spring Cloud and Apache CXF. https://github.com/timpeeters/cxf-brave-np-issue Depending on a local build of Apache CXF after applying this change resolve the issue.
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
