[GitHub] [cxf] timpeeters opened a new pull request #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf] timpeeters opened a new pull request #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

GitBox
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf] deki commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

GitBox
deki commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause
URL: https://github.com/apache/cxf/pull/639#issuecomment-584236388
 
 
   Tim, thanks for your contribution and the detailled description. Much appreciated. To me it looks good, I wonder if the Jenkins build with tests passes. Somehow the GitHub integration seems not have been triggered it.
   
   Would you mind opening an issue https://issues.apache.org/jira/projects/CXF/ here so that we have it documented in our release notes? Otherwise I can also do it.

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf] timpeeters commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

GitBox
In reply to this post by GitBox
timpeeters commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause
URL: https://github.com/apache/cxf/pull/639#issuecomment-584364179
 
 
   Thanks for looking into this. I've created an issue:
   https://issues.apache.org/jira/browse/CXF-8210
   Feel free to update adjust if necessary.

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf] reta commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

GitBox
In reply to this post by GitBox
reta commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause
URL: https://github.com/apache/cxf/pull/639#issuecomment-584419965
 
 
   Thanks for the PR, @timpeeters!

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf] reta merged pull request #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

GitBox
In reply to this post by GitBox
reta merged pull request #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause
URL: https://github.com/apache/cxf/pull/639
 
 
   

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf] adriancole commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

GitBox
In reply to this post by GitBox
adriancole commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause
URL: https://github.com/apache/cxf/pull/639#issuecomment-595626467
 
 
   ps sorry about this one.. we should have always checked null

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services
Reply | Threaded
Open this post in threaded view
|

[GitHub] [cxf] reta commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause

GitBox
In reply to this post by GitBox
reta commented on issue #639: Incompatibility with recent Brave versions causes NullPointerException and hides root cause
URL: https://github.com/apache/cxf/pull/639#issuecomment-596890258
 
 
   NP @adriancole ! Good it was caught :+1:

----------------------------------------------------------------
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:
[hidden email]


With regards,
Apache Git Services