On Wednesday 26 March 2008 17:41:40 Jonathan Ritchie wrote: > Hello > > I am trying to do some pretty simple stuff sending some large files > from a servlet. > > The response is just a standard HttpServletResponse. The code looks > something like this: > > ------------ > java.lang.OutOfMemoryError: Java heap space > at java.util.Arrays.copyOf(Arrays.java:2786) > at
Your JVM is running out of heap-space. You have to start your JVM with appropriate parameters, for example with ----------------------------------------- -Xmx512m -XX:MaxPermSize=256m ------------------------------------------ in the case of a SUN-JVM. (See "java -X" for more information). If you are running your webapp via "mvn jetty:run-war" or "mvn jetty:run" the following will help (assuming you are running linux with a bash): ------------------------------------- export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=256m" ------------------------------------- Finetune 512m and 256m ! Greetings kai --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
