[ https://issues.apache.org/jira/browse/CXF-5504?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13877366#comment-13877366 ]
Vadim Beilin commented on CXF-5504: ----------------------------------- Relevant places in AbstractLoggingInterceptor and MultipleEndpointObserver have not changed in subsequent releases, so I presume the problem is still there in 2.7 and 3.0. > 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)