Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE in JAXRS client when OpenTracing is included #4275

Closed
jonhawkes opened this issue Jul 16, 2018 · 1 comment · Fixed by #4313
Closed

NPE in JAXRS client when OpenTracing is included #4275

jonhawkes opened this issue Jul 16, 2018 · 1 comment · Fixed by #4313
Assignees
Labels
bug This bug is not present in a released version of Open Liberty in:MicroProfile/OpenTracing regression This bug is for something that worked in a past release, but no longer does release bug This bug is present in a released version of Open Liberty release-18.0.0.3 team:Lumberjack

Comments

@jonhawkes
Copy link
Member

jonhawkes commented Jul 16, 2018

18.0.0.2

FROM open-liberty:webProfile7

I have a simple service that acts as a JAXRS client to another service.

When I include the microprofile-1.3 feature, I get an NPE after a warning about OpenTracing. (see attached trace)

Everything works fine with microprofile-1.2 and it also works if I use only the constituent features of microprofile-1.3 that the app needs (mpFaultTolerance-1.0,mpHealth-1.0,mpConfig-1.2,mpRestClient-1.0,mpMetrics-1.1,mpJwt-1.0,mpOpenAPI-1.0)

The code is here: https://github.com/eclipse/microprofile-service-mesh-service-a

trace.log

@jonhawkes jonhawkes added bug This bug is not present in a released version of Open Liberty in:MicroProfile/OpenTracing regression This bug is for something that worked in a past release, but no longer does and removed in:MicroProfile/OpenTracing labels Jul 16, 2018
@tevans78
Copy link
Member

@fmhwong I think the bug is here ...

if ((Boolean) clientRequestContext.getProperty(CLIENT_SPAN_SKIPPED_ID)) {

I think a null check is needed for when the property just doesn't exist in the clientRequestContext.

[18/07/18 11:36:41:741 BST] 000000d2 SystemErr                                                    R Caused by: java.lang.NullPointerException
[18/07/18 11:36:41:741 BST] 000000d2 SystemErr                                                    R 	at com.ibm.ws.opentracing.OpentracingClientFilter.filter(OpentracingClientFilter.java:158)
[18/07/18 11:36:41:741 BST] 000000d2 SystemErr                                                    R 	at org.apache.cxf.jaxrs.client.spec.ClientResponseFilterInterceptor.handleMessage(ClientResponseFilterInterceptor.java:66)
[18/07/18 11:36:41:741 BST] 000000d2 SystemErr                                                    R 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
[18/07/18 11:36:41:741 BST] 000000d2 SystemErr                                                    R 	at org.apache.cxf.jaxrs.client.ClientMessageObserver.onMessage(ClientMessageObserver.java:56)

@fmhwong fmhwong added team:Lumberjack release bug This bug is present in a released version of Open Liberty labels Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This bug is not present in a released version of Open Liberty in:MicroProfile/OpenTracing regression This bug is for something that worked in a past release, but no longer does release bug This bug is present in a released version of Open Liberty release-18.0.0.3 team:Lumberjack
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants