cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Dennis Kieselhorst (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-7357) UnknownHostException not thrown during POST request
Date Wed, 05 Jul 2017 13:58:00 GMT

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

Dennis Kieselhorst commented on CXF-7357:
-----------------------------------------

I'm able to reproduce that issue:
CXFHttpAsyncRequestProducer calls buf.shutdown() in failed method. Although onFirstWrite didn't
succeed AbstractWrappedOutputStream.write tries to continue and therefore an IllegalStateException
is thrown. I have a fix but I'm not really satisfied with it.

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

Mime
View raw message