dawei
unread,Nov 27, 2008, 2:51:38 AM11/27/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Helma
Hello helma-group,
I have a major trouble using helma.Zip:
if I add Data larger than approx. 16MB, the process will stop with a
"java heap space" error.
The adding is a stream function and should not cause that problem, my
system monitor also doesn't recognize any significant memory usage. I
increased the java_option maximum memory in the start.bat anyway,
which, as expected, didn't change anything.
Here is the snippet of my code:
var zip = new helma.Zip (zip_file_name);
zip.addData (upload_file_1.getContent(), file_name_1, 9);
zip.addData (upload_file_2.getContent(), file_name_2, 9);
zip.save(zip_file_name);
upload_file_1/_2 are MimeParts sent by a form. Getting the contents
itself is not the problem, as it's working with smaller sizes. I sent
a large file with helma.Ftp and that was working out OK.
I also used a fixed path-string for the file instead of this
'getContent()' which came to the same result.
Either this is a bug or me handling the Zip wrong. I assume it's the
latter. If you could give advice or have a snippet working for large
files, I would greatly appreciate it! Maybe it's just one more
property-setting?
Thank you very much, have a great day,
dawei