6 Replies Latest reply on Jul 13, 2017 11:06 AM by dellmerca

    memory and heap space issue during mvn build of local Jive

    vanontherun Advanced

      Hi,

       

      I'm trying build the local Jive instance on my Windows XP per https://community.jivesoftware.com/docs/DOC-42471

      and I'm running into memory issues.

       

      [INFO] Compiling 1 source file to C:\maven\mavenProjects\oracleforums\web\target\test-classes

      [INFO] [aspectj:test-compile {execution: default}]

      [WARNING] advice defined in org.springframework.orm.jpa.aspectj.JpaExceptionTranslatorAspect has not been applied [Xlint:adviceDidNotMatch]

      [WARNING] advice defined in org.springframework.mock.staticmock.AnnotationDrivenStaticEntityMockingControl has not been applied [Xlint:adviceDidNotMatch]

      [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]

      [WARNING] advice defined in org.springframework.mock.staticmock.AbstractMethodMockingControl has not been applied [Xlint:adviceDidNotMatch]

      [WARNING] advice defined in com.jivesoftware.community.audit.aop.AuditAspect has not been applied [Xlint:adviceDidNotMatch]

      [WARNING] advice defined in com.jivesoftware.community.license.DenyLicenseSeatStatusAspect has not been applied [Xlint:adviceDidNotMatch]

      [INFO] [surefire:test {execution: default-test}]

      [INFO] Surefire report directory: C:\maven\mavenProjects\oracleforums\web\target\surefire-reports

      Error occurred during initialization of VM

      Could not reserve enough space for object heap

      Could not create the Java virtual machine.

       

       

      Initially, I was getting OOM exceptions around AspectJ:

      ---- Exception Information ---

      java.lang.OutOfMemoryError: Java heap space

        at org.aspectj.util.FileUtil.readAsByteArray(FileUtil.java:1181)

        at org.aspectj.weaver.bcel.BcelWeaver.addAspectsFromJarFile(BcelWeaver.java:260)

        at org.aspectj.weaver.bcel.BcelWeaver.addLibraryJarFile(BcelWeaver.java:234)

        at org.aspectj.ajdt.internal.core.builder.AjBuildManager.initBcelWorld(AjBuildManager.java:863)

       

      So, I added "set MAVEN_OPTS= -Xms512m -Xmx1536m" to mvn.bat and "<argLine>-Xmx1028m</argLine>" to web/pom.xml for aspectj-maven-plugin.  I have about 2.5G of avail physical memory.( I've turned off everything to make sure I've got enough physical mem.)

       

      Also, the logs mention "Please refer to C:\maven\mavenProjects\oracleforums\web\target\surefire-reports for the individual test results." However, I don't see this directory for surefire.

       

      Has anybody run into this issue?

       

      Thanks,
      Van