Uploaded image for project: 'Maven Compiler Plugin'
  1. Maven Compiler Plugin
  2. MCOMPILER-53

org.apache.maven.BuildFailureException : Compilation failure. The system is out of resources.

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.1
    • 2.1
    • None
    • Windows 2K, JDK 1.5_0_11

    Description

      Hi,
      I've a problem when I'm trying to compile a new version of my application.

      fooApp_1.0 has 1905 files, and Maven compiles it right
      dooApp_1.1 has 1985 files, and when I try to compile it I'm receive the following error:

      org.apache.maven.BuildFailureException : 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

      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:5
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExe
      or.java :480)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:45
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycl
      ecutor.java:311)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor
      va:278)
      at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java :143)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:334)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:125)
      at org.apache.maven.cli.MavenCli.main(MavenCli.java :272)
      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:585)
      at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
      at org.codehaus.classworlds.Launcher.launch (Launcher.java:255)
      at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
      at org.codehaus.classworlds.Launcher.main(Launcher.java:375)

      In my pom.xml I'd configured the JDK as:
      <plugin>
      <groupId>org.apache.maven.plugins</groupId>
      <artifactId>maven-compiler-plugin</artifactId>
      <version> 2.1-SNAPSHOT</version>
      <configuration>
      <executable>${JAVA_1_4_HOME}/bin/javac</executable>
      <fork>true</fork>
      <source> 1.4</source>
      <target>1.4</target>
      <meminitial>128m</meminitial>
      <maxmem>1024m</maxmem>
      <verbose>false</verbose>
      </configuration>
      </plugin>

      (I got the same error with version 2.0.2 and 2.0.1).

      I also tried to set MAVEN_OPTS with:
      -Xmx1024m -Xms512m

      and

      -Xmx1024m -Xms512m -XX:PermSize=128m -XX:MaxPermSize=256m

      If I'm using JDK 1.5 to compile, instead of 1.4, I've got this trace:

      The system is out of resources.
      Consult the following stack trace for details.
      java.lang.StackOverflowError
      at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:297)
      at com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:1518)
      at com.sun.tools.javac.tree.Tree$Binary.accept(Tree.java:926)
      at com.sun.tools.javac.comp.Attr.attribTree (Attr.java:275)
      at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:297)
      at com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:1518)
      at com.sun.tools.javac.tree.Tree$Binary.accept(Tree.java :926)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:275)
      at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:297)
      at com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:1518)
      at com.sun.tools.javac.tree.Tree$Binary.accept(Tree.java:926)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:275)
      at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:297)
      at com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:1518)
      at com.sun.tools.javac.tree.Tree$Binary.accept(Tree.java:926)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:275)
      at com.sun.tools.javac.comp.Attr.attribExpr (Attr.java:297)
      at com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:1518)
      at com.sun.tools.javac.tree.Tree$Binary.accept(Tree.java:926)
      at com.sun.tools.javac.comp.Attr.attribTree(Attr.java :275)
      at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:297)
      at com.sun.tools.javac.comp.Attr.visitBinary(Attr.java:1518)
      (about four pages like these ..)

      The project compiles fine using the Eclipse and MaveIde (not when I build with Maven, but when I run build-project from Eclipse using maven for the lib-path).

      Regards
      Pier.

      Attachments

        Activity

          People

            Unassigned Unassigned
            pvignati Pier Mauro Vignati
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: