[ 
https://issues.apache.org/jira/browse/CXF-7357?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16074798#comment-16074798
 ] 

ASF GitHub Bot commented on CXF-7357:
-------------------------------------

GitHub user deki opened a pull request:

    https://github.com/apache/cxf/pull/291

    [CXF-7357] UnknownHostException not thrown during POST request

    I've not committed the fix directly to master, please review.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/deki/cxf CXF-7357

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cxf/pull/291.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #291
    
----

----


> 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
>             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)

Reply via email to