You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Aron Kramlik <ak...@tenzing.com> on 2000/07/20 04:15:51 UTC

IllegalStateException

Does anyone know what this means?

java.lang.IllegalStateException: Response has already been committed
        at
org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:157)

        at
org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
        at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at
org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163)

        at
com.tenzing.servlet.RequestContextImpl.forward(RequestContextImpl.java:172)
        at
com.tenzing.servlet.jsp.JSPLauncherServlet.processJSP(JSPLauncherServlet.java:221)

        at
com.tenzing.servlet.jsp.JSPLauncherServlet.doGetDerived(JSPLauncherServlet.java:172)

        at com.tenzing.servlet.ServletBase.handleRequest(ServletBase.java:329)

        at com.tenzing.servlet.ServletBase.doGet(ServletBase.java:169)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
        at
org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
        at
org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)

        at
org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
        at
org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
        at java.lang.Thread.run(Thread.java:475)

I am running Apache 1.3.9 and Tomcat 3.1 on Mandrake Linux.


Re: IllegalStateException

Posted by Ryan Schutt <rs...@vt.edu>.
I think I've seen that exception in the html of a jsp where I used
<jsp:include> incorrectly...

----- Original Message -----
From: Rob S. <rs...@home.com>
To: <to...@jakarta.apache.org>
Sent: Thursday, July 20, 2000 11:33 AM
Subject: RE: IllegalStateException


> Hi Aron,
>
> > > Does anyone know what this means?
> > >
> > > java.lang.IllegalStateException: Response has already been committed
> > >         at
>
> When your page is "running," output gets sent to a buffer.  When that
buffer
> becomes full (default size is 8k I believe), or you explicitly choose to
> flush it (out.flush() i think?), it's sent to your web server.  You've
> already "committed" to displaying that page to a user, so you're being
told
> that you have to finish what you've started =)
>
> Are you trying to do a redirect after a flush or after a large amount of
> content has been generated?
>
> There's another thing... I can't quite remember what it is, but it's a
> common cause of that message also.  Maybe someone could chime in? =)
>
> - r
>


RE: IllegalStateException

Posted by "Rob S." <rs...@home.com>.
Hi Aron,

> > Does anyone know what this means?
> >
> > java.lang.IllegalStateException: Response has already been committed
> >         at

When your page is "running," output gets sent to a buffer.  When that buffer
becomes full (default size is 8k I believe), or you explicitly choose to
flush it (out.flush() i think?), it's sent to your web server.  You've
already "committed" to displaying that page to a user, so you're being told
that you have to finish what you've started =)

Are you trying to do a redirect after a flush or after a large amount of
content has been generated?

There's another thing... I can't quite remember what it is, but it's a
common cause of that message also.  Maybe someone could chime in? =)

- r


Re: IllegalStateException

Posted by Jeremy Linzer <jl...@alabanza.com>.
Hi,

I don't know if this will help you or not but I also got this error and it turned out to be a problem with my
Beans. I had a bean getmsg and when I changed it to getMsg (capital M instead of lower case m) it worked. A hint
I had was (I am running under Linux RH 6.1) that I have a seperate window open where I go to for shutting down
and starting up Tomcat and there were more errors there and one said java.lang.NoSuchMethodError: TestBean:
method getMsg()Ljava/lang/String; not found.

Good luck,
Jeremy


Aron Kramlik wrote:

> Does anyone know what this means?
>
> java.lang.IllegalStateException: Response has already been committed
>         at
> org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:157)
>
>         at
> org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
>         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at
> org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163)
>
>         at
> com.tenzing.servlet.RequestContextImpl.forward(RequestContextImpl.java:172)
>         at
> com.tenzing.servlet.jsp.JSPLauncherServlet.processJSP(JSPLauncherServlet.java:221)
>
>         at
> com.tenzing.servlet.jsp.JSPLauncherServlet.doGetDerived(JSPLauncherServlet.java:172)
>
>         at com.tenzing.servlet.ServletBase.handleRequest(ServletBase.java:329)
>
>         at com.tenzing.servlet.ServletBase.doGet(ServletBase.java:169)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
>
>         at
> org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
>         at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
>         at java.lang.Thread.run(Thread.java:475)
>
> I am running Apache 1.3.9 and Tomcat 3.1 on Mandrake Linux.


Re: IllegalStateException

Posted by everett stauffer <ev...@chem.ucsd.edu>.
Saw exactly this problem using Apache 1.3.12, Tomcat 3.1, JDK 1.3 on NT 4.0.
I was using the Xalan package and this error came up when I called process().

Turned out the Xalan (XSLT) processor couldn't find a java extension class
and wanted to write out an error.

<RAMPANT-SPECULATION>
Somewhere in the process I think it was trying to grab the nearest equivalent
to System.out, got the Response object and tried to getOutputStream() or some
such which causes this error to be thrown.
</RAMPANT-SPECULATION>

I discovered the solution (real error) by using a different platform (Linux)
which showed the real errors on the console.

Everett


Aron Kramlik wrote:
> 
> Does anyone know what this means?
> 
> java.lang.IllegalStateException: Response has already been committed
>         at
> org.apache.tomcat.core.HttpServletResponseFacade.sendError(HttpServletResponseFacade.java:157)
> 
>         at
> org.apache.jasper.runtime.JspServlet.unknownException(JspServlet.java:299)
>         at org.apache.jasper.runtime.JspServlet.service(JspServlet.java:377)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at
> org.apache.tomcat.core.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:163)
> 
>         at
> com.tenzing.servlet.RequestContextImpl.forward(RequestContextImpl.java:172)
>         at
> com.tenzing.servlet.jsp.JSPLauncherServlet.processJSP(JSPLauncherServlet.java:221)
> 
>         at
> com.tenzing.servlet.jsp.JSPLauncherServlet.doGetDerived(JSPLauncherServlet.java:172)
> 
>         at com.tenzing.servlet.ServletBase.handleRequest(ServletBase.java:329)
> 
>         at com.tenzing.servlet.ServletBase.doGet(ServletBase.java:169)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>         at
> org.apache.tomcat.core.ServletWrapper.handleRequest(ServletWrapper.java:503)
>         at
> org.apache.tomcat.core.ContextManager.service(ContextManager.java:559)
>         at
> org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(Ajp12ConnectionHandler.java:156)
> 
>         at
> org.apache.tomcat.service.TcpWorkerThread.run(PoolTcpEndpoint.java:366)
>         at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:411)
>         at java.lang.Thread.run(Thread.java:475)
> 
> I am running Apache 1.3.9 and Tomcat 3.1 on Mandrake Linux.