You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jeff Amiel <be...@yahoo.com> on 2007/06/07 18:44:55 UTC

Guru? Axis 1.X AxisServlet Exception with already committed response....

I posted in the Axis list a couple of days ago with no real bites...

Getting some more feeback on the struts/tomcat side but being that AxisServlet is what is actually throwing the exception,  I was pointed here.

The exception I see sporadically is pretty simple..


Servlet.service() for servlet AxisServlet threw exception  
java.lang.IllegalStateException
org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.java:220)
org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:610)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
...


After looking at the code in ResponseFacade:

  public void setBufferSize(int size) {
        if (isCommitted())
            throw new IllegalStateException

And the AxisServlet doPost():

 public void doPost(HttpServletRequest req, HttpServletResponse res) throws
            ServletException, IOException {
...
res.setBufferSize(1024 * 8); // provide performance boost.

I have come to the conclusion that the AxisServlet is being handed off a response that is already in a committed state.

I'm at a complete loss as to how this could happen.  (and it happens sporadically)
My own experiments have yielded a possible connection with other activities (struts actions) on the same box that seem to somehow 'induce' this behavior on the Axis side, but I cannot figure out how or why.

I've reduced the webservice implementation that is being called (via axis) to simply doing a Thread.sleep(200) and returning an empty resultset...and I can still produce the issue.

Any thoughts on how bad or irreverent code on the 'other side of the house' (other servlets in my war) can be influencing the Axis elements in this way?

Any help would be appreciated...before I chuck my keyboard out the window!
:)

Tomcat 5.5.20 under Jboss 4
Axis version 1.1 - 1.4 (I tried many versions)
Struts version 1.3x Java 1.5 under FreeBSD 6.0











       
---------------------------------
Be a better Globetrotter. Get better travel answers from someone who knows.
Yahoo! Answers - Check it out.