tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Christopher Schultz <>
Subject Re: AW: AW: Stream closed
Date Fri, 05 Dec 2008 16:42:59 GMT
Hash: SHA1


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
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message