DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-20 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|REOPENED|RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-10-21 06:07 ---
I now agree with Kin-Man's evaluation. Weird Jasper behavior, though.

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 15:01 ---
Well. I believe that Matthias has reason, my code has this bug. The other
problem commented by Remy, I believe that this problem does not causes an
exception, simply that we can not change the JSP buffer (by default 8kb).
Thanks for all

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 14:48 ---
As long as 'len==0' this would be ok. And the exception seems to indicate
exactly that. String.java#getChars, line 484, barfs about the end index (8192)
being larger than the string size.

I would propose the following change to rijmenez's class:

write(byte[] b, int off, int len) {
- writer.write(new String(b), off, len);
+ writer.write(new String(b, off, len));
}

If that doesn't solve the issue, I'm wrong.

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|RESOLVED|REOPENED
 Resolution|INVALID |



--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 14:30 ---
Wait a minute. I believe there's likely a real bug there. If the byte array is
8K long, and the offset is 8K, then there's a problem. I agree that converting
to a String like that is bad, but this doesn't change the fact that the args
seem bogus. As I said, this also looks very similar to Kin-Man's problem, so I
think this bug should stay open a bit longer (I didn't really look into the
issue yet).

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation

[EMAIL PROTECTED] changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||INVALID



--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 13:56 ---
The exception says: "String index out of range: 8192"
According to String.java, this is because the end index is larger than the
string length. So the String you make from the bytes is shorter than 8192 chars.

Your messing up bytes and chars here. Your outputstream converts the bytes to
chars (e.g. does new String(bytes)) and assumes that the indices are still correct.

I suspect that you
* use UTF-8 encoding, where you typically have more bytes than chars
* new String(bytes).length < 8192
* you call writer.write(string, 8192, 0) and bang.

In ISO-encoding, calling your stream with write(new byte[8192], 8192, 0) works
perfectly fine.

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 13:22 ---
ISUMServletOutputStream is submited. Enter to bugzilla to access it.

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 10:11 ---
Well, judging from the stack trace, you
(com.tissat.isum.presentation.ISUMServletOutputStream) are calling the
CharArrayWriter with the wrong parameters. I suspect the bug is there, not in
Jasper.

Please submit both
* what ISUMServletOutputStream gets called with (offset=8192 AND length)
* what ISUMServletOutputStream passes to the CharArrayWriter (String, offset and
length)

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 09:55 ---
Sorry, I can't send you the JSP, I haven't permission :(
The JSP that causes the problem generates its content dinamically and it fails
when generates over 8kb.
Thanks a lot and sorry, my english is not good :)

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 09:40 ---
Thanks. This is indeed the same issue that was reported a few days ago by Kin-Man.
About the JSP which causes this: what does it look like ? Is it caused by a
static content block > 8KB ? Can you submit a test JSP to reproduce the issue ?
If you can't, the stack trace should be enough by itself to fix it, though.

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 09:27 ---
Yes, Jasper calls my output stream with bad parameters, it calls the
write(byte[] b, int offset, int len) method with an array width 8192 bytes and
an offset=8192.

A stacktrace:
java.lang.StringIndexOutOfBoundsException: String index out of range: 8192
at java.lang.String.getChars(String.java:484)
at java.io.CharArrayWriter.write(CharArrayWriter.java:107)
at com.tissat.isum.presentation.ISUMServletOutputStream.write(Unknown Source)
at sun.nio.cs.StreamEncoder$CharsetSE.writeBytes(StreamEncoder.java:336)
at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(StreamEncoder.java:395)
at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:136)
at java.io.OutputStreamWriter.write(OutputStreamWriter.java:191)
at java.io.BufferedWriter.write(BufferedWriter.java:170)
at java.io.PrintWriter.write(PrintWriter.java:200)
at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:306)
at java.io.PrintWriter.write(PrintWriter.java:200)
at org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:159)
at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:355)
at org.apache.jasper.runtime.JspWriterImpl.write(JspWriterImpl.java:366)
at org.apache.jasper.runtime.JspWriterImpl.print(JspWriterImpl.java:491)
at com.tissat.isum.presentation.taglib.ChildrenServicesTag.m1(Unknown Source)
at com.tissat.isum.presentation.taglib.ChildrenServicesTag.doAfterBody(Unknown
Source)
at 
org.apache.jsp.interfaces.inttissat.LeftG_jsp._jspService(LeftG_jsp.java:302)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
...
...
...

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-15 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-15 09:26 ---
Created an attachment (id=8582)
OutputStream of the ResponseWrapper

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



DO NOT REPLY [Bug 23805] - Possible error in response wrapper implementation

2003-10-14 Thread bugzilla
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23805

Possible error in response wrapper implementation





--- Additional Comments From [EMAIL PROTECTED]  2003-10-14 21:45 ---
So Jasper calls your output stream with bad parameters ? Can you give a
stacktrace of the incoming call ? (this is confusing)

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