Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Java heapSize: Out of memeory when Building #1714

quickresponse ·
Hello,
I am new to Quick Build. I apolozise for the naive questions.
I am using Quick Build Version: 3.0.17 .
Quick Build is installed on a linux server
When I try to do a Build I get this error:
[ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)

How should I set this memory flag to get Quickbuild to make a build. Is there any settings which needs to be changed in the configuration or should I change it in the "wrapper.conf" file for the property "wrapper.java.initmemory=128" to 512


Thanks
  • replies 3
  • views 1843
  • stars 0
robinshen ADMIN ·
From where are you observing this error? Is it in the build log? or QuickBuild console? If from build log, it is a sign that the JVM forked by your build script is out of memory, and you will need to check the build script documentation on how to do this. For instance, if you are writing the build script with Ant, you can increase max memory via maxmemory setting here:
http://ant.apache.org/manual/index.html
quickresponse ·
Thanks for your reply RobinShine.

The Error I got was from Build Log and I was using ant build.xml file for building the WAR file with QuickBuild.
The funny thing is when I manually run the target from EclipseIDE It would create the War file fine but when I point the same target to the QuickBuild it throws the OutOfMemory error.
As you have mentioned I have increased the jvmarg -Xmx value from 256M to 512M "<jvmarg value="-Xmx512M" />" but when building it from quickbuild It didn't build even after 2hrs, so I had to cancel it. Usually it builds in 15mins.

Below is the log from my previous failed build from quickbuild with -Xmx=256M, May be the below stack trace would help:

18:09:36,089 [Build] INFO  - [java] [ERROR] Unexpected
18:09:36,111 [Build] INFO - [java] java.lang.OutOfMemoryError: Java heap space
18:09:36,111 [Build] INFO - [java] at java.lang.Class.getDeclaredMethods0(Native Method)
18:09:36,111 [Build] INFO - [java] at java.lang.Class.privateGetDeclaredMethods(Class.java:2444)
18:09:36,111 [Build] INFO - [java] at java.lang.Class.getDeclaredMethod(Class.java:1952)
18:09:36,111 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:499)
18:09:36,111 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessExpression(GenerateJavaAST.java:522)
18:09:36,111 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processExpression(GenerateJavaAST.java:880)
18:09:36,111 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:09:36,111 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
18:09:36,111 [Build] INFO - [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
18:09:36,111 [Build] INFO - [java] at java.lang.reflect.Method.invoke(Method.java:616)
18:09:36,111 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:500)
18:09:36,111 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessExpression(GenerateJavaAST.java:527)
18:09:36,111 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processBinaryOperation(GenerateJavaAST.java:2587)
18:09:36,111 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processExpression(GenerateJavaAST.java:888)
18:09:36,111 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:09:36,111 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
18:09:36,113 [Build] INFO - [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
18:09:36,113 [Build] INFO - [java] at java.lang.reflect.Method.invoke(Method.java:616)
18:09:36,114 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:500)
18:09:36,115 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessExpression(GenerateJavaAST.java:527)
18:09:36,116 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessStatement(GenerateJavaAST.java:557)
18:09:36,120 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatements(GenerateJavaAST.java:1829)
18:09:36,120 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatement(GenerateJavaAST.java:1513)
18:09:36,120 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:09:36,124 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
18:09:36,124 [Build] INFO - [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
18:09:36,125 [Build] INFO - [java] at java.lang.reflect.Method.invoke(Method.java:616)
18:09:36,125 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispatch(GenerateJavaAST.java:500)
18:09:36,126 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.dispProcessStatement(GenerateJavaAST.java:563)
18:09:36,127 [Build] INFO - [java] at com.google.gwt.dev.jjs.impl.GenerateJavaAST$JavaASTGenerationVisitor.processStatement(GenerateJavaAST.java:1712)
18:09:36,128 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:09:36,128 [Build] INFO - [java] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
18:09:36,129 [Build] INFO - [java] [ERROR] Out of memory; to increase the amount of memory, use the -Xmx flag at startup (java -Xmx128M ...)



I really appreciate ur response.

Thanks
robinshen ADMIN ·
Two recommendations:
1. print out the JAVA_HOME environment variable in your Ant build script to see if it is the expected JVM. If not, please configure the JAVA_HOME environment variable in Ant build step.
2. run the Ant build file directly from command line to see if it succeeds.