Uploaded image for project: 'OpenJPA'
  1. OpenJPA
  2. OPENJPA-2456

Fresh checkout from svn won't compile tests due to OutOfMemoryError: Java heap space

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.4.0
    • Component/s: build / infrastructure
    • Labels:
      None
    • Environment:
      Mac OS/X 10.9
      HomeBrew was used to install Maven.
      Java 1.7 and 1.6 (I'm not sure which one Maven is using, but on the command line "java -version" gives 1.7 64-bit)

      Description

      On a Mac with the above environment, run

      > svn checkout http://svn.apache.org/repos/asf/openjpa/trunk openjpa
      > cd openjpa
      > mvn clean install

      And the result is:

      [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:testCompile (test-source-compile) on project openjpa-persistence-jdbc: Compilation failure
      [ERROR] Failure executing javac, but could not parse the error:
      [ERROR]
      [ERROR]
      [ERROR] The system is out of resources.
      [ERROR] Consult the following stack trace for details.
      [ERROR] java.lang.OutOfMemoryError: Java heap space
      [ERROR] at java.util.HashMap.addEntry(HashMap.java:753)
      [ERROR] at java.util.HashMap.put(HashMap.java:385)
      [ERROR] at java.util.HashSet.add(HashSet.java:200)
      [ERROR] at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:748)
      [ERROR] at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:772)
      [ERROR] at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:720)
      [ERROR] at com.sun.tools.javac.comp.Resolve.resolveQualifiedMethod(Resolve.java:1229)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:156)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:205)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:219)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:167)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:205)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterAttributeValue(Annotate.java:219)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterAnnotation(Annotate.java:167)
      [ERROR] at com.sun.tools.javac.comp.MemberEnter.enterAnnotations(MemberEnter.java:743)
      [ERROR] at com.sun.tools.javac.comp.MemberEnter.access$300(MemberEnter.java:42)
      [ERROR] at com.sun.tools.javac.comp.MemberEnter$5.enterAnnotation(MemberEnter.java:711)
      [ERROR] at com.sun.tools.javac.comp.Annotate.flush(Annotate.java:95)
      [ERROR] at com.sun.tools.javac.comp.Annotate.enterDone(Annotate.java:87)
      [ERROR] at com.sun.tools.javac.comp.Enter.complete(Enter.java:485)
      [ERROR] at com.sun.tools.javac.comp.Enter.main(Enter.java:442)
      [ERROR] at com.sun.tools.javac.main.JavaCompiler.enterTrees(JavaCompiler.java:822)
      [ERROR] at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
      [ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:353)
      [ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:279)
      [ERROR] at com.sun.tools.javac.main.Main.compile(Main.java:270)
      [ERROR] at com.sun.tools.javac.Main.compile(Main.java:87)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [ERROR] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [ERROR] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [ERROR] at java.lang.reflect.Method.invoke(Method.java:597)
      [ERROR] at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)

        Activity

        Hide
        jzwolak Jason Zwolak added a comment -

        A work around to this is to set the maven options with:

        export MAVEN_OPTS="-Xmx512m"

        Show
        jzwolak Jason Zwolak added a comment - A work around to this is to set the maven options with: export MAVEN_OPTS="-Xmx512m"
        Hide
        kwsutter Kevin Sutter added a comment -

        It looks like my default setting is this: MAVEN_OPTS=-Xmx1024m

        We should update http://openjpa.apache.org/building.html with this requirement.

        Show
        kwsutter Kevin Sutter added a comment - It looks like my default setting is this: MAVEN_OPTS=-Xmx1024m We should update http://openjpa.apache.org/building.html with this requirement.
        Hide
        allee8285 Albert Lee added a comment -

        building.html updated to:

        Author: buildbot
        Date: Mon Nov 18 20:58:40 2013
        New Revision: 887135

        Log:
        Staging update by buildbot for openjpa

        Modified:
        websites/staging/openjpa/trunk/content/ (props changed)
        websites/staging/openjpa/trunk/content/building.html

        Propchange: websites/staging/openjpa/trunk/content/
        ------------------------------------------------------------------------------
        — cms:source-revision (original)
        +++ cms:source-revision Mon Nov 18 20:58:40 2013
        @@ -1 +1 @@
        -1536901
        +1543150

        Modified: websites/staging/openjpa/trunk/content/building.html
        ==============================================================================
        — websites/staging/openjpa/trunk/content/building.html (original)
        +++ websites/staging/openjpa/trunk/content/building.html Mon Nov 18 20:58:40 2013
        @@ -200,10 +200,16 @@ console, and are known to work on Linux,
        <ol>
        <li>Ensure that you have Java installed and in your path by running: <code>java
        -fullversion</code></li>
        -<li>Install the build tool, Apache Maven 2.2.1 or later, from
        +<li>
        +<p>Set following maven options to avoid out of memory error:</p>
        +<p>set MAVEN_OPTS="-XX:MaxPermSize=128m -Xms512m -Xmx1024m"</p>
        +</li>
        +<li>
        +<p>Install the build tool, Apache Maven 2.2.1 or later, from
        <a href="http://maven.apache.org/">http://maven.apache.org/</a>. If it is installed correctly, typing <em>mvn -v</em>
        from the console will result in text like <code>Apache Maven 2.2.1 (r801777;
        -2009-08-06 21:16:01+0200)</code></li>
        +2009-08-06 21:16:01+0200)</code></p>
        +</li>
        <li>Install Subversion v1.4.x or newer from <a href="http://subversion.apache.org/">http://subversion.apache.org/</a>.
        If it is installed correctly, typing the following command should output
        help information: <strong>svn help</strong> or <strong>svn --version</strong></li>

        Show
        allee8285 Albert Lee added a comment - building.html updated to: Author: buildbot Date: Mon Nov 18 20:58:40 2013 New Revision: 887135 Log: Staging update by buildbot for openjpa Modified: websites/staging/openjpa/trunk/content/ (props changed) websites/staging/openjpa/trunk/content/building.html Propchange: websites/staging/openjpa/trunk/content/ ------------------------------------------------------------------------------ — cms:source-revision (original) +++ cms:source-revision Mon Nov 18 20:58:40 2013 @@ -1 +1 @@ -1536901 +1543150 Modified: websites/staging/openjpa/trunk/content/building.html ============================================================================== — websites/staging/openjpa/trunk/content/building.html (original) +++ websites/staging/openjpa/trunk/content/building.html Mon Nov 18 20:58:40 2013 @@ -200,10 +200,16 @@ console, and are known to work on Linux, <ol> <li>Ensure that you have Java installed and in your path by running: <code>java -fullversion</code></li> -<li>Install the build tool, Apache Maven 2.2.1 or later, from +<li> +<p>Set following maven options to avoid out of memory error:</p> +<p>set MAVEN_OPTS="-XX:MaxPermSize=128m -Xms512m -Xmx1024m"</p> +</li> +<li> +<p>Install the build tool, Apache Maven 2.2.1 or later, from <a href="http://maven.apache.org/"> http://maven.apache.org/ </a>. If it is installed correctly, typing <em>mvn -v</em> from the console will result in text like <code>Apache Maven 2.2.1 (r801777; -2009-08-06 21:16:01+0200)</code></li> +2009-08-06 21:16:01+0200)</code></p> +</li> <li>Install Subversion v1.4.x or newer from <a href="http://subversion.apache.org/"> http://subversion.apache.org/ </a>. If it is installed correctly, typing the following command should output help information: <strong>svn help</strong> or <strong>svn --version</strong></li>

          People

          • Assignee:
            allee8285 Albert Lee
            Reporter:
            jzwolak Jason Zwolak
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development