Hi,

sorry for the long delay - I needed some time away from tomcat and XML ;)
The client is XCelsius (an MS Excel extension that can be used to
access webservices and read XML files from web resources).

As far as I can tell, the XML-Beans generated code works well - even if
The stream is closed after reading, this should be no problem as the next
request will submit a new stream, right?

I will rework the servlet to use a reader, I let you know if that fixes the
Problem.

Thanks for your suggestions,

Stefan

-----Ursprüngliche Nachricht-----
Von: Christopher Schultz [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 5. Dezember 2008 17:43
An: Tomcat Users List
Betreff: Re: AW: AW: java.io.IOException: Stream closed

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Stefan,

Schuster Stefan wrote:
> The code reading the stream is generated by XMLBeans. 
> 
> Is there something that I should not do with the stream? For example
> closing it or something like that?

You shouldn't have to do anything like that.

> <<<ERROR>>>
>                       inDoc = DataDocument.Factory.parse(is, xmlOptions);
> <<<END_OF_ERROR>>>

Looks reasonable to me. Does DataDocument.Factory.parse() do anything
weird like close the stream and then try to read from it again?

Your problem is probably caused by one of two things:

1. Some code stupidly closes the input stream, then tries reading
   from it later

2. The client didn't send enough data

I wonder if there's a character encoding problem, here. You are using an
InputStream from the request and not a Reader, so the Content-Type
encoding from the request is being ignored. If the XML processing
instruction includes an "encoding" parameter, this might be okay, but
I've seen XML documents saying one type of encoding while the actual
encoding is something else (whoops!).

What client are you using to submit this data to the servlet?

Also, what Connector are you using in Tomcat? AJP? HTTP? Nio?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkk5WhMACgkQ9CaO5/Lv0PCfSwCfef6s6a3meZROUFiJsGBEgSgx
zbgAn1bOUSVVikoGJLNy3Dvgot0bHCoR
=rJcd
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to