IllegalStateException: Current state = FLUSHED, new state = CODING



This mysterious exception is being thrown at random intervals by my
Tomcat installtion. Once its thrown once, it will always rethrow with
each request until Tomcat is bounced.

I have searched all over google for any clues about this. Most
references to it are referring to outdated versions of Tomcat, Java,
log4j etc. In fact, references to this error later than 2003 seem rare
indeed; yet here it is.

I'm completely lost because:
(1) it's the only exception being thrown - there are no other errors
or behaviour of interest, except that no response gets to the client
(2) the stack trace contains no reference to any of my own code. It
involves only Tomcat, log4j and Sun's nio.

Anyone have any clues?

Tomcat version is 5.5.16.
Java version is 1.5.0_08.
Log4j version is 1.2.13.


May 29, 2007 3:50:40 PM org.apache.catalina.connector.CoyoteAdapter
service
SEVERE: An exception or error occurred in the container during the
request processing
java.lang.IllegalStateException: Current state = FLUSHED, new state =
CODING
at
java.nio.charset.CharsetEncoder.throwIllegalStateException(Unknown
Source)
at java.nio.charset.CharsetEncoder.encode(Unknown Source)
at sun.nio.cs.StreamEncoder$CharsetSE.implWrite(Unknown
Source)
at sun.nio.cs.StreamEncoder.write(Unknown Source)
at sun.nio.cs.StreamEncoder.write(Unknown Source)
at java.io.OutputStreamWriter.write(Unknown Source)
at java.io.Writer.write(Unknown Source)
at org.apache.log4j.helpers.QuietWriter.write(QuietWriter.java:
47)
at
org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:301)
at
org.apache.log4j.DailyRollingFileAppender.subAppend(DailyRollingFileAppender.java:
358)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:
159)
at
org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:230)
at
org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:
65)
at org.apache.log4j.Category.callAppenders(Category.java:203)
at org.apache.log4j.Category.forcedLog(Category.java:388)
at org.apache.log4j.Category.log(Category.java:853)
at
org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:
193)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
260)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
178)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
126)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:
105)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:
541)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:
107)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:
148)
at
org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:199)
at
org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:282)
at
org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:754)
at
org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:
684)
at org.apache.jk.common.ChannelSocket
$SocketConnection.runIt(ChannelSocket.java:876)
at org.apache.tomcat.util.threads.ThreadPool
$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

.



Relevant Pages

  • Re: Tomcat: Exception thrown whilst processing POSTed parameters
    ... the following exception frequently in my Tomcat logs. ... Could I be forgetting to do something on the client side? ... try using Scriptaculous/Prototype and see if the error goes away. ...
    (comp.lang.java.programmer)
  • Fehlernder FacesContext
    ... Ich hab da ein Problem mit dem FacesContext. ... Servlet.servicefor servlet jsp threw exception ... javax.servlet.jsp.JspException: Cannot find FacesContext ... Aber die Beispiel Applikation läuft auf dem Tomcat. ...
    (de.comp.lang.java)
  • Re: Tomcat 3.2.4 problem after response.sendRedirect(...)
    ... > I am currently struggling with a Tomcat issue. ... When I send a redirect within the service method of my controller ... coming in before the thread in which the original request was processed ... you're not trying to cache request objects or the ...
    (comp.lang.java.programmer)
  • Critical Problem with Tomcat 3.3.1 and SSL
    ... I issue the following command - ... Next, I send the name.csr file to the CA, and recieve 3 certificates. ... I restart tomcat and assume that everything should be in order. ... ThreadPool: Caught exception executing ...
    (comp.lang.java.developer)
  • Critical Problem with Tomcat 3.3.1 and SSL
    ... I issue the following command - ... Next, I send the name.csr file to the CA, and recieve 3 certificates. ... I restart tomcat and assume that everything should be in order. ... ThreadPool: Caught exception executing ...
    (comp.lang.java.programmer)