[ https://issues.apache.org/jira/browse/CXF-6975?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15391725#comment-15391725 ]
Evgeny Mironenko edited comment on CXF-6975 at 7/25/16 11:52 AM: ----------------------------------------------------------------- I wrote a simple unit test with a minimal configuration and found that this problem occurs only in runtime. By the some reason the behavior and trace are different: Stacktrace in unit test. {code} org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) {code} Just in case, I've excluded JBoss WS subsystem from my application as it's described here http://cxf.apache.org/docs/application-server-specific-configuration-guide.html#ApplicationServerSpecificConfigurationGuide-JBossApplicationServer was (Author: emironen): I wrote a simple unit test with a minimal configuration and found that this problem occurs only in runtime. By the some reason the behavior and trace are different: Stacktrace in unit test. {code} org.apache.cxf.interceptor.Fault: Could not send Message. at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64) at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) at org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) {code} > Logging interceptor doesn't log request payload in case of Connection refused > ----------------------------------------------------------------------------- > > Key: CXF-6975 > URL: https://issues.apache.org/jira/browse/CXF-6975 > Project: CXF > Issue Type: Bug > Components: Core > Affects Versions: 3.1.3, 3.1.6 > Environment: Java 7, Jboss EAP 6.2 > Reporter: Evgeny Mironenko > > When you send a request to some nonexistent endpoint you get > {{java.net.ConnectException: Connection refused: connect}}, but request was > not logged since {{LoggingOutInterceptor#formatLoggingMessage}} has not been > invoked. > Stacktrace: > {code} > org.apache.cxf.interceptor.Fault: Connection refused: connect > at > org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:109) > at > org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68) > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) > at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) > at > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) > .................... > Caused by: com.ctc.wstx.exc.WstxIOException: Connection refused: connect > at com.ctc.wstx.sw.BaseStreamWriter.flush(BaseStreamWriter.java:255) > [woodstox-core-asl-4.4.1.jar:4.4.1] > at > org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:107) > [cxf-core-3.1.6.jar:3.1.6] > at > org.apache.cxf.wsdl.interceptors.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68) > [cxf-rt-wsdl-3.1.6.jar:3.1.6] > at > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308) > [cxf-core-3.1.6.jar:3.1.6] > at org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:514) > [cxf-core-3.1.6.jar:3.1.6] > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:423) > [cxf-core-3.1.6.jar:3.1.6] > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:324) > [cxf-core-3.1.6.jar:3.1.6] > at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:277) > [cxf-core-3.1.6.jar:3.1.6] > at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96) > [cxf-rt-frontend-simple-3.1.6.jar:3.1.6] > at > org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:139) > [cxf-rt-frontend-jaxws-3.1.6.jar:3.1.6] > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)