Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

WebIOException: The stream is closed.

Former Member
0 Kudos

Hi All,

I am getting the following error(in defaultTrace.0.trc), when trying to access my webservice:

The error is: com.sap.engine.services.servlets_jsp.server.exceptions.WebIOException: The stream is closed.

Exception id: [0011D8053E240064000000130000138C00043C45816A8425]#

I saw in some post that it might be because of users not having the

appropriate authorization.. How and where do I set the authorization ??

Thanks,

talimeren

4 REPLIES 4

Former Member
0 Kudos

Hello,

WebIOException has nothing to deal with the security and authentication. This error appears when the servlet is trying to flush a data in an already closed stream. The stream has been closed due to socket timeout expiration (for example a very long response was generated) or due to socket close by the peer.

Kind regards,

Tsvetomir

0 Kudos

Hi Tsvetomir,

Thank you for your reply,

Actually I am trying to implement a Web service with security (SSL, X.509 certificate).

I have a client (X.508 certificate installed on my browser) which uses a proxy to call my Web service.

When I am calling any of the Web service function I am getting that WebIOException:The stream is closed. error.

Thanks

Talimeren

0 Kudos

Hello Talimeren,

I did not really get your scenario (the certificate itself cannot be a client, it is just an identity) but, anyway, probably you have configured the SSL service with mutual authentication and as the client certificate is not accepted, the connection is dropped. Please apply <a href="https://service.sap.com/sap/support/notes/956099">SAP Note 956099</a> to analyze the connection close issue.

Of course, all that is an assumption, as I said I am not sure in your scenario. Please try to describe it more correctly.

Cheers, Tsvetomir

0 Kudos

Hi Tsvetomir,

Thanks for your reply again.

Of course the certificate is not the client, it is just used for authenticating the client.

I'll briefly explain what I am trying to do.

I have a web service deployed on my Netweaver server with the following settings on my

web service configuration :

Transport Protocol: https

Auth. mechanism: HTTP authen. (X.509 certificate)

I then created a client proxy using the wsdl of my deployed web service

(in my proxy's logical port I've chosen x.509 option and deployed it).

I have servlet which calls the client proxy.

The servlet is able to lookup to the proxy and when it

tries to call the web service it gives an error:

I have two cases:

<b>Case I</b> : When Require client authentication certificate is ticked in the SSL provider in the VA

I get the following error in the defaultTrace.0.trc

Exception id: [0011D8053E24006700000BDE0000138C00043CBDACA8CB85]#

#1.5#0011D8053E240066000001070000138C00043CBDAFC9A5BD#1192685302296#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/WebApplication#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#Guest#0#####SAPEngine_Application_Thread[impl:3]_20##0#0#Error##Plain###Processing HTTP request to servlet [BioServlet] finished with error. The error is: com.sap.engine.services.servlets_jsp.server.exceptions.WebIllegalStateException: The output is committed.

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:354)

at client.bias.BioServlet.doPost(BioServlet.java:392)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

#

#1.5#001

<b>Case II</b>: When do not request client certificate is chosen in the SSL provider in VA

I get the following error in the defaultTrace.0.trc

#1.5#0011D8053E240065000000D80000138C00043CBD5096958C#1192683705359#com.sap.engine.services.httpserver##com.sap.engine.services.httpserver#Guest#0#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error#1#/System/Server#Plain###User Guest, IP address

HTTP request processing failed. HTTP error [401] will be returned. The error is [Cannot authenticate the user.No details available].#

#1.5#0011D8053E24005C000018E90000138C00043CBD5096B901#1192683705375#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#sap.com/WebApplication#com.sap.engine.services.servlets_jsp.client.RequestInfoServer#Guest#0#####SAPEngine_Application_Thread[impl:3]_15##0#0#Error##Plain###Processing HTTP request to servlet [BioServlet] finished with error. The error is: com.sap.engine.services.servlets_jsp.server.exceptions.WebIllegalStateException: The output is committed.

at com.sap.engine.services.servlets_jsp.server.runtime.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:354)

at client.bias.BioServlet.doPost(BioServlet.java:392)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:390)

at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:264)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:347)

at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:325)

at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:887)

at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:241)

at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)

at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:148)

at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:33)

at com.sap.engine.core.cluster.impl6.session.MessageRunner.run(MessageRunner.java:41)

at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)

at java.security.AccessController.doPrivileged(Native Method)

at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:100)

at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)

#