You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Forsberg, Mike" <mi...@amd.com> on 2007/05/18 18:54:55 UTC

OOM Error (Java heap space) from 1800+ form elements, am I doing something wrong?

A form of approximately 1800 form elements is causing
"java.lang.OutOfMemoryError: Java heap space".  When 1000 form elements
are used, no such error.

The environment:
- JBoss 4.0.5
- Struts 1.1
- A jsp page using struts <html:form> tags to start and end the form
block.  Then insidethe form, xslt is used to parse a 300 element xml
document into 6 input tags per element.

What seems to be happening, the reset method for the form bean is
called. Then before any set methods are called, the OOME is thrown.

Should I throw out (REALLY DON'T WANT TO) the xslt and use nested form
beans properties?

Any help would be appreciated.


Mike Forsberg
Software Engineer II
APM - APC
T 512.602.0220




---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: OOM Error (Java heap space) from 1800+ form elements, am I doing something wrong?

Posted by Lance <la...@marketpipe.com>.
Firstly, I hope you are only using "request" scope for these forms. 
Session scope would kill your application.
Have you tried experimenting with the JVM options? 
(http://blogs.sun.com/watt/resource/jvm-options-list.html)
In particular -Xms (initial Java heap size) and -Xmx (maximum Java heap 
size)
If using jboss, you will need to edit run.bat (PC) or run.conf (unix)

eg
set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx512m

Forsberg, Mike wrote:
> A form of approximately 1800 form elements is causing
> "java.lang.OutOfMemoryError: Java heap space".  When 1000 form elements
> are used, no such error.
>
> The environment:
> - JBoss 4.0.5
> - Struts 1.1
> - A jsp page using struts <html:form> tags to start and end the form
> block.  Then insidethe form, xslt is used to parse a 300 element xml
> document into 6 input tags per element.
>
> What seems to be happening, the reset method for the form bean is
> called. Then before any set methods are called, the OOME is thrown.
>
> Should I throw out (REALLY DON'T WANT TO) the xslt and use nested form
> beans properties?
>
> Any help would be appreciated.
>
>
> Mike Forsberg
> Software Engineer II
> APM - APC
> T 512.602.0220
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org