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

2007-05-22 Thread Lance
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  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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

  



-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2007-05-21 Thread Forsberg, Mike
Posting to the group, since I believe a solution has been found.

It appears that my issue was something like a buffer overrun in the jsp.
A solution that we are testing is the following code snippet:

<%@ page buffer="1024kb" autoFlush="false" %>

The current size might be a little overkill but, my issue seems to have
vanished.

Thanks goes to my co-worker you pointed me in this direction.  Thanks,
also to the great support from this mailing list.

Mike

-Original Message-
From: Forsberg, Mike 
Sent: Friday, May 18, 2007 2:06 PM
To: user@struts.apache.org
Subject: 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  tags to start and end the form
block.  Then inside the 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.

Any help would be appreciated.

Mike Forsberg
Software Engineer II
APM - APC
T 512.602.0220




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



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

2007-05-18 Thread Christopher Schultz
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Mike,

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.
>
> [Am I doing something wrong?]

Yes, you are using 1800 form elements. :(

Seriously, you might want to think about splitting that up into multiple
pages.

There was a team at one of my old jobs where they had a bunch of fields
on a single page (not anywhere near 1800.. probably in the 200 range or
so) and they had a problem where it was possible to submit the form
before it had loaded entirely, and their testers were able to actually
lose data since the form was being submitted before all the form data
was available to submit.

1800 form elements on a single page sounds like a risky UI move. I'd
recommend far fewer.

- -chris
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGTf2X9CaO5/Lv0PARAoX7AJ9V+uATItL9xrP/tgBTnq3pqTxPiwCdHRu4
H7m+UJfs7TuR0XdH1DV9rXI=
=LqYN
-END PGP SIGNATURE-

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]