"mvn clean install" crashes with java.lang.OutOfMemoryError: PermGen space after update to java 1.6.0_04 --------------------------------------------------------------------------------------------------------
Key: MCOMPILER-64 URL: http://jira.codehaus.org/browse/MCOMPILER-64 Project: Maven 2.x Compiler Plugin Issue Type: Bug Environment: Maven version: 2.0.8 Java version: 1.6.0_04 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" Reporter: Joern Huxhorn Priority: Critical After upgrading to java 1.6.0_04 i can't build a big multi-module project anymore. java.exe keeps allocating more and more memory (ca. 260MB) until it crashes with an error like the following: 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.defineClass(ClassLoader.java:620) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) at java.net.URLClassLoader.access$000(URLClassLoader.java:56) at java.net.URLClassLoader$1.run(URLClassLoader.java:195) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:188) at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56) at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) at com.sun.tools.javac.comp.Annotate.<init>(Annotate.java:52) at com.sun.tools.javac.comp.Annotate.instance(Annotate.java:36) at com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:215) at com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:168) at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:293) at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72) at com.sun.tools.javac.main.Main.compile(Main.java:340) at com.sun.tools.javac.main.Main.compile(Main.java:279) at com.sun.tools.javac.main.Main.compile(Main.java:270) at com.sun.tools.javac.Main.compile(Main.java:87) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420) at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141) at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493) at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:102) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:447) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:539) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:480) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:459) Executing the same command with this setup Maven version: 2.0.8 Java version: 1.5.0_13 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" works perfectly. java.exe allocates at most 110MB. Increasing the PermGen space using -XX:MaxPermSize=512M didn't help, either... This is probably a java regression introduced with j6u4 but it could also be a problem in org.codehaus.plexus.compiler.javac.IsolatedClassLoader. I didn't experience any other problems with the new java version, so far. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira