Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8210

Incompatibility with recent Brave versions causes NullPointerException and hides root cause

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.3.5, 3.2.12
    • 3.3.6, 3.2.13, 3.4.0
    • Tracing Brave
    • None
    • Unknown

    Description

      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*

      Attachments

        Activity

          People

            Unassigned Unassigned
            peeteti Tim Peeters
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: