[Building Sakai] Sakai CLE build java.lang.OutOfMemoryError: PermGen space
Simon McLeish
simon.mcleish at gmail.com
Mon Jul 23 01:45:16 PDT 2012
Hi all,
I'm currently trying to get my first source code build of Sakai working,
and am getting memory errors despite setting MAVEN_OPTS to "-Xms1024
-Xmx1024 -XX:PermSize=1024m -XX:MaxPermSize=1024m" - larger values than
suggested than in the Sakai documentation (and as much as can be used in
the Debian virtual machine I'm using). The output from the free -m command
when not running anything gives
total used free shared buffers cached
Mem: 1002 490 511 0 37 375
-/+ buffers/cache: 77 925
Swap: 713 25 688
but there don't seem to be any indications that the memory is all used
during the compilation (if I monitor top, memory usage by the process
reaches about 50% at the point when it crashes out). I'm using sudo to run
the compilation, and I've set the MAVEN_OPTS in /etc/bash.bashrc, and get
the correct value back from sudo echo $MAVEN_OPTS, so it does appear to be
picked up correctly.
The error itself looks like this (removing all the successful build bits
which come before this point):
l/tomcat/webapps/sakai-calendar-summary-tool.war
[INFO]
------------------------------------------------------------------------
[INFO] Building sakai-calendar-tool
[INFO] task-segment: [clean, install, sakai:deploy]
[INFO]
------------------------------------------------------------------------
[INFO] [clean:clean {execution: default-clean}]
[INFO] Deleting directory
/home/sjm62/sakai-src-2.8.2/calendar/calendar-tool/tool/target
[INFO] [resources:resources {execution: default-resources}]
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 27 resources
[INFO] Copying 1 resource
[INFO] [compiler:compile {execution: default-compile}]
[INFO] Compiling 4 source files to
/home/sjm62/sakai-src-2.8.2/calendar/calendar-tool/tool/target/classes
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Compilation failure
Failure executing javac, but could not parse the error:
The system is out of resources.
Consult the following stack trace for details.
java.lang.OutOfMemoryError: PermGen space
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at
org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at
org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at
org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56)
at com.sun.tools.javac.main.Main.compile(Main.java:340)
at com.sun.tools.javac.main.Main.compile(Main.java:279)
[INFO]
------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 1 minute 26 seconds
[INFO] Finished at: Mon Jul 23 08:42:31 BST 2012
[INFO] Final Memory: 96M/243M
[INFO]
------------------------------------------------------------------------
I'm confused by the final memory being much less than the figures I'd set -
is there something wrong here? If not, any advice?
Thanks for any help,
Simon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://collab.sakaiproject.org/pipermail/sakai-dev/attachments/20120723/bee2da83/attachment.html
More information about the sakai-dev
mailing list