Skip to main content

IllegalStateException: Post too large

2 replies [Last post]
kjsempire
Offline
Joined: 2006-03-02

Using:
Sun Java System Application Server 9.1 (build b33)
Java(TM) SE Runtime Environment (build 1.6.0-b105)

I have a form that contains many fields of them one maps to a CLOB object which can be very
large, why is there cutoff size for a POST request? Is there a way to change this? I've checked
the Admin Guide but cannot seem to find any references to this. Any help would be much
appreciated, this problem occurred in our production environment so it is a pressing issue here.

Thanks,

<br />
[#|2007-09-26T07:30:53.076-0700|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=14;_ThreadName=httpSSLWorkerThread-1311-3;_RequestID=5476ad47-3cf1-42a2-950f-22ea94540130;|StandardWrapperValve[MyControllerServlet]:<br />
PWC1406: Servlet.service() for servlet MyControllerServlet threw exception<br />
java.lang.IllegalStateException: Post too large<br />
        at org.apache.coyote.tomcat5.CoyoteRequest.parseRequestParameters(CoyoteRequest.java:2861)<br />
        at org.apache.coyote.tomcat5.CoyoteRequest.getParameter(CoyoteRequest.java:1267)<br />
        at org.apache.coyote.tomcat5.CoyoteRequestFacade.getParameter(CoyoteRequestFacade.java:375)<br />
        at path.to.my.MyControllerServlet.processRequest(MyControllerServlet.java:48)<br />
        at path.to.my.MyControllerServlet.doPost(MyControllerServlet.java:203)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)<br />
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)<br />
        at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)<br />
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)<br />
        at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)<br />
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)<br />
        at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)<br />
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)<br />
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)<br />
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)<br />
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)<br />
        at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)<br />
        at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)<br />
        at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)<br />
        at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)<br />
        at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)<br />
        at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)<br />
        at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)<br />
|#]<br />

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Jeanfrancois Arcand

Hi,

can you try adding, under http-service element in
${glassfish.home}/domains/domain/config/domain.xml the following
property (or use admin-gui):

Let me know the result.

Thanks

-- Jeanfrancois

glassfish@javadesktop.org wrote:
> Using:
> Sun Java System Application Server 9.1 (build b33)
> Java(TM) SE Runtime Environment (build 1.6.0-b105)
>
> I have a form that contains many fields of them one maps to a CLOB object which can be very
> large, why is there cutoff size for a POST request? Is there a way to change this? I've checked
> the Admin Guide but cannot seem to find any references to this. Any help would be much
> appreciated, this problem occurred in our production environment so it is a pressing issue here.
>
> Thanks,
>
> [code]
> [#|2007-09-26T07:30:53.076-0700|SEVERE|sun-appserver9.1|javax.enterprise.system.container.web|_ThreadID=14;_ThreadName=httpSSLWorkerThread-1311-3;_RequestID=5476ad47-3cf1-42a2-950f-22ea94540130;|StandardWrapperValve[MyControllerServlet]:
> PWC1406: Servlet.service() for servlet MyControllerServlet threw exception
> java.lang.IllegalStateException: Post too large
> at org.apache.coyote.tomcat5.CoyoteRequest.parseRequestParameters(CoyoteRequest.java:2861)
> at org.apache.coyote.tomcat5.CoyoteRequest.getParameter(CoyoteRequest.java:1267)
> at org.apache.coyote.tomcat5.CoyoteRequestFacade.getParameter(CoyoteRequestFacade.java:375)
> at path.to.my.MyControllerServlet.processRequest(MyControllerServlet.java:48)
> at path.to.my.MyControllerServlet.doPost(MyControllerServlet.java:203)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:727)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
> at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:398)
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:277)
> at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:255)
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:188)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
> at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:81)
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:207)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:611)
> at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:564)
> at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:558)
> at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1067)
> at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:249)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:549)
> at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:248)
> at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:199)
> at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
> |#]
> [/code]
> [Message sent by forum member 'kjsempire' (kjsempire)]
>
> http://forums.java.net/jive/thread.jspa?messageID=237168
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
> For additional commands, e-mail: users-help@glassfish.dev.java.net
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@glassfish.dev.java.net
For additional commands, e-mail: users-help@glassfish.dev.java.net

kjsempire
Offline
Joined: 2006-03-02

Jeanfrancois - your help is much appreciated, this is a stress-reliever for our team.

Thank you for the quick reply, your solution was the correct fix.

Just in case anyone else comes across this documentation. I previously had attempted adding
this same variable incorrectly to the element as mentioned in a bug report that I
found on this particular issue.
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=2144332

The Evaluation says: 'Need to expose "maxPostSize" as property in domain.xml.'

I'm not even sure if this was an official bug for Glassfish, but it was the only thing that I could find
in my searches. The element that is mentioned on that page is incorrect, it should be as
Jeanfrancois pointed out the element.