You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Dennis Kieselhorst (JIRA)" <ji...@apache.org> on 2017/07/29 06:48:00 UTC

[jira] [Resolved] (CXF-7357) UnknownHostException not thrown during POST request

     [ https://issues.apache.org/jira/browse/CXF-7357?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dennis Kieselhorst resolved CXF-7357.
-------------------------------------
    Resolution: Fixed

> UnknownHostException not thrown during POST request
> ---------------------------------------------------
>
>                 Key: CXF-7357
>                 URL: https://issues.apache.org/jira/browse/CXF-7357
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 3.1.11
>         Environment: Windows 7, Java 8
>            Reporter: Michael Scheepers
>            Assignee: Dennis Kieselhorst
>             Fix For: 3.2.0
>
>
> I'm using Apache CXF client with async http client and JAXRS client factory to access RESTful services.
> When specifying an invalid host name and than executing a POST request instead of the expected {{UnknownHostException}} a {{IllegalStateException}} is thrown by the client proxy.
> Anyway, for GET requests the {{UnknownHostException}} is thrown as expected.
> Stacktrace:
> {code:java}
> WARNING: Interceptor for {http://resource.path.definition/}ServiceName has thrown exception, unwinding now
> java.lang.IllegalStateException: IllegalStateException invoking https://www.unknown-host-name.com/some/url: Buffer already closed for writing
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> 	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
> 	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> 	at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.mapException(HTTPConduit.java:1385)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1374)
> 	at org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit$AsyncWrappedOutputStream.close(AsyncHTTPConduit.java:415)
> 	at org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
> 	at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:653)
> 	at org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
> 	at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:308)
> 	at org.apache.cxf.jaxrs.client.AbstractClient.doRunInterceptorChain(AbstractClient.java:677)
> 	at org.apache.cxf.jaxrs.client.ClientProxyImpl.doChainedInvocation(ClientProxyImpl.java:783)
> 	at org.apache.cxf.jaxrs.client.ClientProxyImpl.invoke(ClientProxyImpl.java:235)
> 	at com.sun.proxy.$Proxy17.someUrl(Unknown Source)
> Caused by: java.lang.IllegalStateException: Buffer already closed for writing
> 	at org.apache.cxf.transport.http.asyncclient.SharedOutputBuffer.write(SharedOutputBuffer.java:229)
> 	at org.apache.cxf.transport.http.asyncclient.AsyncHTTPConduit$AsyncWrappedOutputStream$1.write(AsyncHTTPConduit.java:431)
> 	at org.apache.cxf.io.AbstractWrappedOutputStream.write(AbstractWrappedOutputStream.java:51)
> 	at org.apache.cxf.io.AbstractThresholdOutputStream.write(AbstractThresholdOutputStream.java:69)
> 	at org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1341)
> 	... 10 more
> {code}



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)