struts-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Samba siva Rao (JIRA)" <>
Subject [jira] Commented: (STR-3187) Java.Lang.OutOfMemoryError while posting huge data with enctype="multipart/form-data"
Date Mon, 08 Jun 2009 06:40:42 GMT


Samba siva Rao commented on STR-3187:

Sorry .. small correction..
those are not hidden fields..
My form bean is containing huge data to process, in the form of array list.

This is as per my requirement. I have certain number of items in my screen which are dynamic,
number may vary from 3 items to 150 or more items.
For each item, user has to enter price, discount & various taxes details.

So, if number of items in my form are more - i have more data to submit. 
in this case, while submitting the form having enctype="multipart/form-data" in my <html:form/>
tag, i am experiencing OutOfMemory error (HTTP Status 500-). I am using commons-fileupload.jar
1.0 implementation version as i need to provide an option to upload attachment in this page.

Where as, if i remove this upload option & enctype property form my <html:form/>
tag, i do not see any problem in submitting even more than 150 items.

What could be the reason?

> Java.Lang.OutOfMemoryError while posting huge data with enctype="multipart/form-data"

> --------------------------------------------------------------------------------------
>                 Key: STR-3187
>                 URL:
>             Project: Struts 1
>          Issue Type: Bug
>         Environment: Tomcat 5.0, JDK 1.4.2_09, SQLServer 2000, Struts 1.1, Spring 1.2.4,
Commons-fileupload.jar 1.0 
>            Reporter: Samba siva Rao
> 1: I am getting java.lang.OutOfMemoryError when the form in my jsp code is as below.

> <html:form action="/actnMpng" enctype="multipart/form-data" method ="post" > 
> - JSP code ? containing very huge data (hidden parameters) with file upload attachment
facility (<html:file/>). 
> </html:form> 
> This is throwing OutOfMemoryError eventhough I am not attaching/uploading any files.
> I have more than 1000 hidden fields in this jsp.
> When i check the used memory in my action class, i came to know that nearly 200 MB memory
is utilizing on each action submit from this jsp (i have more actions / buttons in this form
in different tabs).
> 2:*** The same data is getting posted successfully if the form is submitted with out

> enctype="multipart/form-data" and without providing the attachment facility. (by removing
<html:file/> tags)
> 3: I am facing this problem only when my form is containing more hidden parameters to
> Where as when my form is  containg less fields (which are dynamic), then i am not facing
this problem eventhough my form is with enctype="multipart/form-data"
> Please find the below log generated in Tomcat.
> 2009-06-02 16:51:42 StandardWrapperValve[action]: Servlet.service() for servlet action
threw exception
> java.lang.OutOfMemoryError
> plese let me know if anybody came across this problem. 

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message