Sling
  1. Sling
  2. SLING-443

OutOfMemory Error while building the jcr/jackrabbit-server bundle

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: JCR
    • Labels:
      None

      Description

      Reported on [1], the full build of Sling causes an OutOfMemoryError while building the jcr/jackrabbit-server bundle. This is most probably the result of implementing SLING-437.

      A fix must be found for this issue to circumvent this.

      [1] http://markmail.org/message/gdn7jtlrdjcepngg

        Issue Links

          Activity

          Hide
          Bertrand Delacretaz added a comment -

          In revision 905548, changed the warning in the parent pom to

          [echo] ********************** WARNING (SLING-443) **********************************
          [echo] On most platforms, you'll get OutOfMemoryErrors when building unless you set
          [echo] MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=128M", see SLING-443.
          [echo] *****************************************************************************

          Those settings work for me for a full build using java version "1.6.0_17" on macosx 10.6.2.

          JDK 1.5 VMs probably don't need the MaxPermSize setting.

          Changed the parent pom only, modules which still point to the released pom won't have this change for now.

          Show
          Bertrand Delacretaz added a comment - In revision 905548, changed the warning in the parent pom to [echo] ********************** WARNING ( SLING-443 ) ********************************** [echo] On most platforms, you'll get OutOfMemoryErrors when building unless you set [echo] MAVEN_OPTS="-Xmx256M -XX:MaxPermSize=128M", see SLING-443 . [echo] ***************************************************************************** Those settings work for me for a full build using java version "1.6.0_17" on macosx 10.6.2. JDK 1.5 VMs probably don't need the MaxPermSize setting. Changed the parent pom only, modules which still point to the released pom won't have this change for now.
          Hide
          Olaf Fricke added a comment -

          Hello,

          I got an OutOfMemoryError, although I already had defined MAVEN_OPTS set to "-Xms256m -Xmx521m". The reason for that was not the heap space, but the perm gen space. Therefore I set the MAVEN_OPTS to "-Xms256m -Xmx521m -XX:MaxPermSize=256m". With that setting, a full build of sling succeeded on my machine (after changing a lot of POM files, to work aroung SLING-555).

          Best regards,
          Olaf

          Show
          Olaf Fricke added a comment - Hello, I got an OutOfMemoryError, although I already had defined MAVEN_OPTS set to "-Xms256m -Xmx521m". The reason for that was not the heap space, but the perm gen space. Therefore I set the MAVEN_OPTS to "-Xms256m -Xmx521m -XX:MaxPermSize=256m". With that setting, a full build of sling succeeded on my machine (after changing a lot of POM files, to work aroung SLING-555 ). Best regards, Olaf
          Hide
          Bertrand Delacretaz added a comment -

          In revision 659132, added a message that says

          [echo] ********************** WARNING (SLING-443) **********************************
          [echo] On most platforms, building Sling currently requires setting
          [echo] MAVEN_OPTS="-Xmx256M", see https://issues.apache.org/jira/browse/SLING-443
          [echo] You might get a "java.lang.OutOfMemoryError: Java heap space" if that
          [echo] setting is not correct.
          [echo] *****************************************************************************

          at the beginning of each build

          Show
          Bertrand Delacretaz added a comment - In revision 659132, added a message that says [echo] ********************** WARNING ( SLING-443 ) ********************************** [echo] On most platforms, building Sling currently requires setting [echo] MAVEN_OPTS="-Xmx256M", see https://issues.apache.org/jira/browse/SLING-443 [echo] You might get a "java.lang.OutOfMemoryError: Java heap space" if that [echo] setting is not correct. [echo] ***************************************************************************** at the beginning of each build
          Hide
          Bertrand Delacretaz added a comment -

          See "Increase JVM memory if needed" in http://incubator.apache.org/sling/site/maventipsandtricks.html for a workaround

          Show
          Bertrand Delacretaz added a comment - See "Increase JVM memory if needed" in http://incubator.apache.org/sling/site/maventipsandtricks.html for a workaround
          Hide
          Felix Meschberger added a comment -

          I don't think we really need this for the initial release because there is a known workaround and the issue is only important for the full reactor build.

          Show
          Felix Meschberger added a comment - I don't think we really need this for the initial release because there is a known workaround and the issue is only important for the full reactor build.
          Hide
          Felix Meschberger added a comment -

          One possible solution would be to not use the maven-bundle-plugin any more - just for this single bundle. But of course, this would be kind of a last resort because it would mean hand-coding the complete manifest ...

          Show
          Felix Meschberger added a comment - One possible solution would be to not use the maven-bundle-plugin any more - just for this single bundle. But of course, this would be kind of a last resort because it would mean hand-coding the complete manifest ...

            People

            • Assignee:
              Felix Meschberger
              Reporter:
              Felix Meschberger
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:

                Development