Al Bundy created CXF-8272:
-----------------------------

             Summary: getting IOException: stream is closed after calling 
@Oneway SAP-Service
                 Key: CXF-8272
                 URL: https://issues.apache.org/jira/browse/CXF-8272
             Project: CXF
          Issue Type: Bug
          Components: JAX-WS Runtime
    Affects Versions: 2.7.18
         Environment: Windows Server 2016
{code:java}
java version "1.8.0_202"
Java(TM) SE Runtime Environment (build 1.8.0_202-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.202-b08, mixed mode){code}
            Reporter: Al Bundy


At first: I'm not sure if this is a CXF issue or a infrastructure problem in 
the customer-environment.

Currently wa have an APP_SERVER_OLD that calls services from SAP_SERVER without 
issues.
Now we moved from APP_SERVER_OLD to APP_SERVER_NEW but still using SAP_SERVER:

On APP_SERVER_NEW we have the problem, that after an async-Soap-Service-call 
(method has @Oneway-annotation) we get an IOException: stream is closed during 
closing of the the InputStream.

Calling non-@Oneway services works as expected on APP_SERVER_NEW.

Currently I assume that this is a infrastructure-problem because we are using 
the same software-version on APP_SERVER_OLD and APP_SERVER_NEW.
Unfortunately I don't have a testcase. :(

Does anyone know why this can happen?
Or is this maybe a bug in CXF?
Here is the relevant part of the stacktrace:


{code:java}
stream is closed
 sun.net.www.http.ChunkedInputStream.ensureOpen(ChunkedInputStream.java:174)
 sun.net.www.http.ChunkedInputStream.available(ChunkedInputStream.java:718)
 java.io.FilterInputStream.available(FilterInputStream.java:168)
 org.apache.cxf.helpers.IOUtils.consume(IOUtils.java:305)
 
org.apache.cxf.transport.http.URLConnectionHTTPConduit$URLConnectionWrappedOutputStream.closeInputStream(URLConnectionHTTPConduit.java:261)
 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1597)
 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1520)
 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1317)
 org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:56)
 org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:632)
 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:272)
 org.apache.cxf.endpoint.ClientImpl.doInvoke(ClientImpl.java:572)
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:481)
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:382)
 org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:335)
 org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:96)
 org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:136)
 com.sun.proxy.$Proxy113.oaAssetDataSend(Unknown Source){code}
As you can see this error occurs because IOUtils.consume is called during close 
thile the stream is already closed.

I know that 2.7.18 is an old version but this can also happen in current 
versions:

[https://github.com/apache/cxf/blob/master/rt/transports/http/src/main/java/org/apache/cxf/transport/http/URLConnectionHTTPConduit.java]

Maybe you can check if the stream is already closed?

Is there something we can do to prevent this error?



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to