Discussion:
Compile / Unit Test error (java.lang.OutOfMemoryError: Java heap space)
Brandon Turner
2010-04-16 03:11:28 UTC
Permalink
I want to contribute to GWT so I followed the directions on the wiki. I can
compile GWT fine using 'ant', but when I do 'ant test' I get the following
error:

compile.tests:
[mkdir] Created dir:
/Users/brandonturner/gwt/trunk/build/out/dev/bin-test
[gwt.javac] Compiling 1100 source files to
/Users/brandonturner/gwt/trunk/build/out/dev/bin-test
[gwt.javac]
[gwt.javac]
[gwt.javac] The system is out of resources.
[gwt.javac] Consult the following stack trace for details.
[gwt.javac] java.lang.OutOfMemoryError: Java heap space
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.visitVarDef(MemberEnter.java:609)
[gwt.javac] at
com.sun.tools.javac.tree.JCTree$JCVariableDecl.accept(JCTree.java:691)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.signature(MemberEnter.java:350)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.visitMethodDef(MemberEnter.java:560)
[gwt.javac] at
com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:639)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:387)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.memberEnter(MemberEnter.java:399)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.finishClass(MemberEnter.java:410)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.finish(MemberEnter.java:1000)
[gwt.javac] at
com.sun.tools.javac.comp.MemberEnter.complete(MemberEnter.java:967)
[gwt.javac] at com.sun.tools.javac.code.Symbol.complete(Symbol.java:386)
[gwt.javac] at
com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:758)
[gwt.javac] at com.sun.tools.javac.comp.Enter.complete(Enter.java:451)
[gwt.javac] at com.sun.tools.javac.comp.Enter.main(Enter.java:429)
[gwt.javac] at
com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:819)
[gwt.javac] at
com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
[gwt.javac] at com.sun.tools.javac.main.Main.compile(Main.java:353)
[gwt.javac] at com.sun.tools.javac.main.Main.compile(Main.java:279)
[gwt.javac] at com.sun.tools.javac.main.Main.compile(Main.java:270)
[gwt.javac] at com.sun.tools.javac.Main.compile(Main.java:69)
[gwt.javac] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[gwt.javac] at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
[gwt.javac] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[gwt.javac] at java.lang.reflect.Method.invoke(Method.java:597)
[gwt.javac] at
org.apache.tools.ant.taskdefs.compilers.Javac13.execute(Javac13.java:56)
[gwt.javac] at org.apache.tools.ant.taskdefs.Javac.compile(Javac.java:997)
[gwt.javac] at org.apache.tools.ant.taskdefs.Javac.execute(Javac.java:820)
[gwt.javac] at
org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
[gwt.javac] at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
[gwt.javac] at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
[gwt.javac] at java.lang.reflect.Method.invoke(Method.java:597)

BUILD FAILED
/Users/brandonturner/gwt/trunk/build.xml:130: The following error occurred
while executing this line:
/Users/brandonturner/gwt/trunk/build.xml:27: The following error occurred
while executing this line:
/Users/brandonturner/gwt/trunk/build.xml:61: The following error occurred
while executing this line:
/Users/brandonturner/gwt/trunk/dev/build.xml:22: Compile failed; see the
compiler error output for details.


I looked in the trunk/build.xml to see if there was some where I can bump up
the memory, but couldn't find it. I have seen the error before compiling my
own project and increasing the memory using the -Xmx fixed it.

*Is there a log somewhere with more details of the build? Or is there
somewhere I can increase the memory for the compiler?*

-Brandon
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Tsukasa
2010-04-26 12:26:45 UTC
Permalink
I think you should just add the vm-arguments -Xms and -Xmx to the run
configuration of your ant build or add them to commandline arguments
if you use ant manually at the appropriate position. Those specify how
much memory the JVM running the build will request from your operating
system (standard is AFAIK 256 MB)
--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To post to this group, send email to google-web-toolkit-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
To unsubscribe from this group, send email to google-web-toolkit+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/***@public.gmane.org
For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
Loading...