tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Cruikshank <a...@epitonic.com>
Subject Re: *Bad* stack trace.
Date Wed, 05 Jan 2000 01:34:25 GMT
Looks like you've called response.getOutputStream() somewhere in your JSP 
page.  The servlet spec lets you get an output stream or an output writer, 
but not both.  JSP pages always use the writer, but they don't actually 
call getWriter() until the flush() at the end of the page.  If you call 
response.getOutputStream() before that, it won't throw an exception, but 
the flush at the end of the page will inevitably throw an 
IllegalStateException when it tries to get the Writer.

Unfortunately, the message for this exception is missing (hence the "cannot 
find...").  This came up last week and someone said he'd fix it.  Are you 
sure you have the latest build?

Alex
alex@epitonic.com

At 04:11 PM 1/4/00 -0800, you wrote:
>I don't have a ton of time to fix this right now but since it is a very
>bad one I wanted to put it here.
>
>1.  The exception couldn't get the message "serverResponse.writer.ise"
>from LocalStrings.properties.  I don't like how StringManager just
>changes the message to "cannot find message associated with key" as this
>is a  very bad thing and you should probably throw a RuntimeException so
>that you complain louder.
>
>2.  The exception is generated on the out.flush() from the generated
>jsp.  Therefore I can't get this to work with my current Java library.
>All other example .jsps work but not ours so I assume it is some of our
>code that is manifesting this.
>
>Here you go.  If no one jumps on this I might ask for CVS write and fix
>this in a couple days as it is critical this this gets fixed for us.
>
>java.lang.IllegalStateException: cannot find message associated with key
>: serverResponse.writer.ise
>         at org.apache.tomcat.core.Response.getWriter(Response.java:217)
>         at
>org.apache.tomcat.core.HttpServletResponseFacade.getWriter(HttpServletRespo 
>nseFacade.java:150)
>         at
>org.apache.jasper.runtime.JspWriterImpl.initOut(JspWriterImpl.java:154)
>         at
>org.apache.jasper.runtime.JspWriterImpl.flushBuffer(JspWriterImpl.java:146)
>         at
>org.apache.jasper.runtime.JspWriterImpl.flush(JspWriterImpl.java:191)
>         at
>icenter._0002ficenter_0002findex_0002ejspindex_jsp_0._jspService(_0002ficen 
>ter_0002findex_0002ejspindex_jsp_0.java:137)
>         at
>org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:126)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>         at
>org.apache.jasper.runtime.JspServlet$JspServletWrapper.service(JspServlet.j 
>ava:161)
>         at
>org.apache.jasper.runtime.JspServlet.serviceJspFile(JspServlet.java:247)
>         at
>org.apache.jasper.runtime.JspServlet.service(JspServlet.java:352)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:865)
>         at
>org.apache.tomcat.core.ServiceInvocationHandler.method(ServletWrapper.java: 
>626)
>         at
>org.apache.tomcat.core.ServletWrapper.handleInvocation(ServletWrapper.java: 
>534)
>         at
>org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:378)
>         at
>org.apache.tomcat.core.Context.handleRequest(Context.java:644)
>         at
>org.apache.tomcat.core.ContextManager.service(ContextManager.java:440)
>         at
>org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(Http 
>ConnectionHandler.java:144)
>         at
>org.apache.tomcat.service.TcpConnectionThread.run(TcpEndpoint.java:304)
>         at java.lang.Thread.run(Thread.java:479)
>
>--
>Kevin A Burton
>Senior Software Engineer
>Kendara Inc
>http://www.kendara.com
>Mobile:  408-910-6145
>"If you continue running Windows, your system may become unstable."
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message