wood burning stoves 2.0*
The moose likes Web Services and the fly likes javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed" Watch "javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed" New topic
Author

javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed

Haroon Subair
Greenhorn

Joined: Apr 08, 2011
Posts: 2
Hi All,

My Eclipse RCP application publishes a JAXB webservice in Eclipse JRE's lightweight webserver. When the service is invoked by an external client, I get a javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed exception. The service is up as I could hit the endpoint wsdl url in the browser.

One thing which I have noticed is that when i build the Eclipse product from my local machine, the webservice works fine.

But the product taken from the subversion does'nt. Although both the products are built from same version of code.

The launcher jar in the plugins folder for the product which i built from the workspace is org.eclipse.equinox.launcher_1.0.200.v20090520.jar

and that of the product from the subversion is org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar


Can it be something with the JRE/Eclipse version.
JRE version is 1.6.0_21.
Eclipse for RCP/Plug-in Developers1.2.0.20090617-1252

Please help me in debugging the issue.


Stack trace of the exception is as follows

javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed
at com.sun.xml.internal.ws.streaming.TidyXMLStreamReader.close( Unknown S
ource)
at com.sun.xml.internal.ws.server.sei.EndpointArgumentsBuilder$ DocLit.re
adRequest(Unknown Source)
at com.sun.xml.internal.ws.server.sei.EndpointMethodHandler.inv oke(Unkno
wn Source)
at com.sun.xml.internal.ws.server.sei.SEIInvokerTube.processReq uest(Unkn
own Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.__doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber._doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.doRun(Unknown Source)
at com.sun.xml.internal.ws.api.pipe.Fiber.runSync(Unknown Source)
at com.sun.xml.internal.ws.server.WSEndpointImpl$2.process(Unkn own Sourc
e)
at com.sun.xml.internal.ws.transport.http.HttpAdapter$HttpToolk it.handle
(Unknown Source)
at com.sun.xml.internal.ws.transport.http.HttpAdapter.handle(Un known Sou
rce)
at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler. handleExc
hange(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.WSHttpHandler. handle(Un
known Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Un known Sou
rce)
at com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unkno wn Source
)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.io.IOException: Stream is closed
at sun.net.httpserver.FixedLengthInputStream.readImpl(Unknown Source)
at sun.net.httpserver.LeftOverInputStream.drain(Unknown Source)
at sun.net.httpserver.LeftOverInputStream.close(Unknown Source)
at java.io.FilterInputStream.close(Unknown Source)
at com.sun.xml.internal.ws.transport.http.server.ServerConnecti onImpl$1.
close(Unknown Source)
... 22 more



--

cheers
Haroon.
Haroon Subair
Greenhorn

Joined: Apr 08, 2011
Posts: 2
Hi All,
The issue surfaced for all the OneWay services. The issue was with JAX-WS version of the JRE referenced by the Eclipse to build the product.
Eclipse was referring JRE1.6.0_7. The issue is fixed in JAXWS version 2.1.3.
I have updated the JRE to 1.6.0_22 which solved the issue.

--
cheers
Haroon.
 
Consider Paul's rocket mass heater.
 
subject: javax.xml.ws.WebServiceException: java.io.IOException: Stream is closed