Maven 2.x Compiler Plugin

"mvn clean install" crashes with java.lang.OutOfMemoryError: PermGen space after update to java 1.6.0_04

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Critical Critical
  • Resolution: Unresolved
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Maven version: 2.0.8
    Java version: 1.6.0_04
    OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows"
  • Number of attachments :
    0

Description

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.

Activity

Hide
Michael Semb Wever added a comment -

I get this too. Know of no workaround.

Show
Michael Semb Wever added a comment - I get this too. Know of no workaround.
Hide
Sebastian Dehne added a comment -

Same problem here. I tried to upgrade to j6u5 but that didn't help. However, no such problem when using j6u2.

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.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:400)
at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:136)
at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:483)
at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111)
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)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:282)

Thanks.

Show
Sebastian Dehne added a comment - Same problem here. I tried to upgrade to j6u5 but that didn't help. However, no such problem when using j6u2. 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.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:400) at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:136) at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:483) at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:111) 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) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:333) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:126) at org.apache.maven.cli.MavenCli.main(MavenCli.java:282) Thanks.
Hide
Asgeir S. Nilsen added a comment -

Same problem here. I'm running with -XX:MaxPermSize=128m.

java version "1.6.0_06"
Java(TM) SE Runtime Environment (build 1.6.0_06-b02)
Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode)

Maven version: 2.0.9
Java version: 1.6.0_06
OS name: "sunos" version: "5.10" arch: "x86" Family: "unix"
build 09-May-2008 13:00:08 The system is out of resources.
build 09-May-2008 13:00:08 Consult the following stack trace for details.
build 09-May-2008 13:00:08 java.lang.OutOfMemoryError: PermGen space
build 09-May-2008 13:00:08 at java.lang.ClassLoader.defineClass1(Native Method)
build 09-May-2008 13:00:08 at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
build 09-May-2008 13:00:08 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
build 09-May-2008 13:00:08 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
build 09-May-2008 13:00:08 at java.net.URLClassLoader.access$000(URLClassLoader.java:56)
build 09-May-2008 13:00:08 at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
build 09-May-2008 13:00:08 at java.security.AccessController.doPrivileged(Native Method)
build 09-May-2008 13:00:08 at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
build 09-May-2008 13:00:08 at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56)
build 09-May-2008 13:00:08 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
build 09-May-2008 13:00:08 at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:314)
build 09-May-2008 13:00:08 at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72)
build 09-May-2008 13:00:08 at com.sun.tools.javac.main.Main.compile(Main.java:340)
build 09-May-2008 13:00:08 at com.sun.tools.javac.main.Main.compile(Main.java:279)
build 09-May-2008 13:00:08 at com.sun.tools.javac.main.Main.compile(Main.java:270)
build 09-May-2008 13:00:08 at com.sun.tools.javac.Main.compile(Main.java:87)
build 09-May-2008 13:00:08 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
build 09-May-2008 13:00:08 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
build 09-May-2008 13:00:08 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
build 09-May-2008 13:00:08 at java.lang.reflect.Method.invoke(Method.java:597)
build 09-May-2008 13:00:08 at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420)
build 09-May-2008 13:00:08 at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141)
build 09-May-2008 13:00:08 at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493)
build 09-May-2008 13:00:08 at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114)
build 09-May-2008 13:00:08 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
build 09-May-2008 13:00:08 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)

Show
Asgeir S. Nilsen added a comment - Same problem here. I'm running with -XX:MaxPermSize=128m. java version "1.6.0_06" Java(TM) SE Runtime Environment (build 1.6.0_06-b02) Java HotSpot(TM) Server VM (build 10.0-b22, mixed mode) Maven version: 2.0.9 Java version: 1.6.0_06 OS name: "sunos" version: "5.10" arch: "x86" Family: "unix" build 09-May-2008 13:00:08 The system is out of resources. build 09-May-2008 13:00:08 Consult the following stack trace for details. build 09-May-2008 13:00:08 java.lang.OutOfMemoryError: PermGen space build 09-May-2008 13:00:08 at java.lang.ClassLoader.defineClass1(Native Method) build 09-May-2008 13:00:08 at java.lang.ClassLoader.defineClass(ClassLoader.java:620) build 09-May-2008 13:00:08 at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124) build 09-May-2008 13:00:08 at java.net.URLClassLoader.defineClass(URLClassLoader.java:260) build 09-May-2008 13:00:08 at java.net.URLClassLoader.access$000(URLClassLoader.java:56) build 09-May-2008 13:00:08 at java.net.URLClassLoader$1.run(URLClassLoader.java:195) build 09-May-2008 13:00:08 at java.security.AccessController.doPrivileged(Native Method) build 09-May-2008 13:00:08 at java.net.URLClassLoader.findClass(URLClassLoader.java:188) build 09-May-2008 13:00:08 at org.codehaus.plexus.compiler.javac.IsolatedClassLoader.loadClass(IsolatedClassLoader.java:56) build 09-May-2008 13:00:08 at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319) build 09-May-2008 13:00:08 at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:314) build 09-May-2008 13:00:08 at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:72) build 09-May-2008 13:00:08 at com.sun.tools.javac.main.Main.compile(Main.java:340) build 09-May-2008 13:00:08 at com.sun.tools.javac.main.Main.compile(Main.java:279) build 09-May-2008 13:00:08 at com.sun.tools.javac.main.Main.compile(Main.java:270) build 09-May-2008 13:00:08 at com.sun.tools.javac.Main.compile(Main.java:87) build 09-May-2008 13:00:08 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) build 09-May-2008 13:00:08 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) build 09-May-2008 13:00:08 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) build 09-May-2008 13:00:08 at java.lang.reflect.Method.invoke(Method.java:597) build 09-May-2008 13:00:08 at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420) build 09-May-2008 13:00:08 at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141) build 09-May-2008 13:00:08 at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493) build 09-May-2008 13:00:08 at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:114) build 09-May-2008 13:00:08 at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) build 09-May-2008 13:00:08 at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) build 09-May-2008 13:00:08 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
Hide
Vincent Siveton added a comment -

Could you provide us a reproducible test case?

Show
Vincent Siveton added a comment - Could you provide us a reproducible test case?
Hide
Steinar Bang added a comment -

I'm seeing this problem on
Maven version: 2.0.8
Java version: 1.6.0_06
OS name: "linux" version: "2.6.24-19-generic" arch: "i386" Family: "unix"
(The exact OS is Ubuntu 8.04, on an Intel Pentium M)

Think this problem appeared when I started to use JDK 1.6 instead of 1.5.0_11. Everything else in the environment is the same.

I had MAVEN_OPTS set to -Xmx512m. I've tried setting it to -Xmx1024m, but that didn't make any difference.

I can't produce any test case either, sorry!

Here's my stack trace, on a "mvn -DskipTests clean install":
[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.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.processing.JavacProcessingEnvironment.<init>(JavacProcessingEnvironment.java:138)
at com.sun.tools.javac.main.JavaCompiler.initProcessAnnotations(JavaCompiler.java:874)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:724)
at com.sun.tools.javac.main.Main.compile(Main.java:353)
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.CompilerMojo.execute(CompilerMojo.java:114)
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)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)

Show
Steinar Bang added a comment - I'm seeing this problem on Maven version: 2.0.8 Java version: 1.6.0_06 OS name: "linux" version: "2.6.24-19-generic" arch: "i386" Family: "unix" (The exact OS is Ubuntu 8.04, on an Intel Pentium M) Think this problem appeared when I started to use JDK 1.6 instead of 1.5.0_11. Everything else in the environment is the same. I had MAVEN_OPTS set to -Xmx512m. I've tried setting it to -Xmx1024m, but that didn't make any difference. I can't produce any test case either, sorry! Here's my stack trace, on a "mvn -DskipTests clean install": [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.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.processing.JavacProcessingEnvironment.<init>(JavacProcessingEnvironment.java:138) at com.sun.tools.javac.main.JavaCompiler.initProcessAnnotations(JavaCompiler.java:874) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:724) at com.sun.tools.javac.main.Main.compile(Main.java:353) 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.CompilerMojo.execute(CompilerMojo.java:114) 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) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:311) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:278) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:143)
Hide
Steinar Bang added a comment -

I upgraded to maven 2.0.9, but the problem persisted.

I found this link
http://mail-archives.apache.org/mod_mbox/tuscany-dev/200809.mbox/%3C4B0CE5F4FC974DDC988FB01812E54E88@rfengt60p%3E
and changed MAVEN_OPTS from
-Xmx512m
to
-Xmx512m -XX:MaxPermSize=384m

And the problem went away.

Show
Steinar Bang added a comment - I upgraded to maven 2.0.9, but the problem persisted. I found this link http://mail-archives.apache.org/mod_mbox/tuscany-dev/200809.mbox/%3C4B0CE5F4FC974DDC988FB01812E54E88@rfengt60p%3E and changed MAVEN_OPTS from -Xmx512m to -Xmx512m -XX:MaxPermSize=384m And the problem went away.
Hide
werner mueller added a comment -

the docs mention some options to adjust memory settings for the compiler:
http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-with-memory-enhancements.html

but i dont know if its working

Show
werner mueller added a comment - the docs mention some options to adjust memory settings for the compiler: http://maven.apache.org/plugins/maven-compiler-plugin/examples/compile-with-memory-enhancements.html but i dont know if its working
Hide
Barrie Treloar added a comment - - edited

Did you try setting MAVEN_OPTS to include -XX:MaxPermSize=512M?

e.g on the command line use
set MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=512M

If that works promote it to a permanent environment variable

Show
Barrie Treloar added a comment - - edited Did you try setting MAVEN_OPTS to include -XX:MaxPermSize=512M? e.g on the command line use set MAVEN_OPTS=-Xmx512M -XX:MaxPermSize=512M If that works promote it to a permanent environment variable

People

Vote (6)
Watch (10)

Dates

  • Created:
    Updated: