cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sailendranath Kasavajjhula (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (CXF-5144) JAX-RS Client Proxy-based API connection leak
Date Tue, 24 Feb 2015 05:30:13 GMT

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

Sailendranath Kasavajjhula commented on CXF-5144:
-------------------------------------------------

I migrated my application from CXF 2.7.7 to CXF 3.0.4. I have set the Bus property "response.stream.auto.close"
to "true". Then, I started getting the below error. The reason being the "entity" is becoming
"null", as part of "ResponseImpl.autoClose()" method. 

I don't get the below exception, if the bus property "response.stream.auto.close" is set to
"false". However, if the bus property "response.stream.auto.close" is set to "false", the
connection may not be reusable as the input stream is not closed.

Could you please suggest, how to proceed.

=================================================================================
javax.ws.rs.ProcessingException: java.lang.IllegalStateException: Entity is not available
	at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:1195)
	at org.apache.cxf.jaxrs.client.WebClient.doResponse(WebClient.java:1159)
	at org.apache.cxf.jaxrs.client.WebClient.doChainedInvocation(WebClient.java:1095)
	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:893)
	at org.apache.cxf.jaxrs.client.WebClient.doInvoke(WebClient.java:864)
	at org.apache.cxf.jaxrs.client.WebClient.invoke(WebClient.java:427)
	at org.apache.cxf.jaxrs.client.WebClient.get(WebClient.java:610)
	at com.walmart.platform.soa.common.providers.SOAJSONJAXBProviderTest.getBookTest(SOAJSONJAXBProviderTest.java:44)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:483)
	at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:84)
	at org.testng.internal.Invoker.invokeMethod(Invoker.java:714)
	at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:901)
	at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1231)
	at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:127)
	at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:111)
	at org.testng.TestRunner.privateRun(TestRunner.java:767)
	at org.testng.TestRunner.run(TestRunner.java:617)
	at org.testng.SuiteRunner.runTest(SuiteRunner.java:334)
	at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:329)
	at org.testng.SuiteRunner.privateRun(SuiteRunner.java:291)
	at org.testng.SuiteRunner.run(SuiteRunner.java:240)
	at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
	at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
	at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224)
	at org.testng.TestNG.runSuitesLocally(TestNG.java:1149)
	at org.testng.TestNG.run(TestNG.java:1057)
	at org.testng.remote.RemoteTestNG.run(RemoteTestNG.java:111)
	at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:204)
	at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:175)
Caused by: java.lang.IllegalStateException: Entity is not available
	at org.apache.cxf.jaxrs.impl.ResponseImpl.checkEntityIsClosed(ResponseImpl.java:475)
	at org.apache.cxf.jaxrs.impl.ResponseImpl.getActualEntity(ResponseImpl.java:137)
	at org.apache.cxf.jaxrs.impl.ResponseImpl.getEntity(ResponseImpl.java:142)
	at org.apache.cxf.jaxrs.utils.JAXRSUtils.fromResponse(JAXRSUtils.java:1716)
	at org.apache.cxf.jaxrs.client.WebClient.handleResponse(WebClient.java:1185)
	... 31 more

> JAX-RS Client Proxy-based API connection leak
> ---------------------------------------------
>
>                 Key: CXF-5144
>                 URL: https://issues.apache.org/jira/browse/CXF-5144
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>            Reporter: James Wu
>            Assignee: Sergey Beryozkin
>             Fix For: 2.6.10, 2.7.7, 3.0.0-milestone1
>
>
> JAX-RS Client Proxy-based API could not reuse the TCP connection, even though with keep-alive.
The reason is the InputStream did not be closed when the response body had been handled in
ClientProxyImpl.handleResponse(), so do Webclient.handleResponse().



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message