Vadim Beilin created CXF-5504: --------------------------------- Summary: AbstractLoggingInterceptor.getMessageLogger throws NPE when MultipleEndpointObserver is used Key: CXF-5504 URL: https://issues.apache.org/jira/browse/CXF-5504 Project: CXF Issue Type: Bug Components: Core Affects Versions: 2.5 Reporter: Vadim Beilin
The method {{AbstractLoggingInterceptor#getMessageLogger(Message)}} that was introduced by CXF-3888 assumes that {{message.getExchange().getEndpoint()}} is not null. This assumption does not work if one uses {{org.apache.cxf.transport.MultipleEndpointObserver}} as the message observer, leading to NPE: {noformat} java.lang.NullPointerException: null at org.apache.cxf.interceptor.AbstractLoggingInterceptor.getMessageLogger(AbstractLoggingInterceptor.java:78) ~[cxf-2.5.9.jar:2.5.9] at org.apache.cxf.interceptor.LoggingInInterceptor.handleMessage(LoggingInInterceptor.java:73) ~[cxf-2.5.9.jar:2.5.9] at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263) ~[cxf-2.5.9.jar:2.5.9] at org.apache.cxf.transport.MultipleEndpointObserver.onMessage(MultipleEndpointObserver.java:98) [cxf-2.5.9.jar:2.5.9] ... {noformat} Would it be possible to check first if endpoint is present? -- This message was sent by Atlassian JIRA (v6.1.5#6160)