cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Scheepers (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-7357) UnknownHostException not thrown during POST request
Date Tue, 02 May 2017 16:27:04 GMT
Michael Scheepers created CXF-7357:
--------------------------------------

             Summary: 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.3.15#6346)

Mime
View raw message