On 10/10/2019 18:32, Jehan PROCACCIA wrote: > ok, I tried your build command > > [root@buildcentos7-64 lsc-master]# mvn clean package -Popendj > > startLdapServer: > [echo] Starting OpenDJ embedded server from > /tmp/lsc-master/target/test-classes > [java] 16:15:34.671 [main] INFO org.lsc.Configuration - Logging > configuration successfully loaded from > /tmp/lsc-master/target/test-classes/etc/logback.xml > [java] 16:15:34.673 [main] INFO org.lsc.Configuration - LSC > configuration successfully loaded from > /tmp/lsc-master/target/test-classes/etc/ > [java] # > [java] OpenJDK 64-Bit Server VM warning: INFO: > os::commit_memory(0x00007f9679b70000, 65536, 1) failed; error='Cannot > allocate memory' (errno=12) > [java] # There is insufficient memory for the Java Runtime Environment > to continue. > [java] # Native memory allocation (mmap) failed to map 65536 bytes for > committing reserved memory. > [java] # An error report file with more information is saved as: > [java] # /tmp/lsc-master/target/test-classes/hs_err_pid391.log > [java] [thread 140284020078336 also had an error] > ... > file:/tmp/lsc-master/target/classes/ > file:/tmp/lsc-master/target/test-classes/ > 16:17:16.664 [main] INFO org.reflections.Reflections - Reflections took 24 > ms to scan 2 urls, producing 97 keys and 185 values > 16:17:16.665 [main] DEBUG o.l.c.JaxbXmlConfigurationHelper - Importing XML > schema file: schemas/lsc-core-2.2.xsd > OpenJDK 64-Bit Server VM warning: INFO: os::commit_memory(0x00000000fc800000, > 5242880, 0) failed; error='Cannot allocate memory' (errno=12) > # > # There is insufficient memory for the Java Runtime Environment to continue. > # Native memory allocation (mmap) failed to map 5242880 bytes for committing > reserved memory. > # An error report file with more information is saved as: > > > apparently there is not enough memory , my system has 2048M. > > I tried to set min and max memory usage to my JVM > > [root@buildcentos7-64 lsc-master]# vim /etc/java/java.conf > JAVACMD_OPTS="-Xms256m -Xmx2g" > > so it still fails > Any idea on how much memory is needed, and how to set the JVM to have enough > memory ? > > thanks .
Hi, Use $MAVEN_OPTS to set -Xmx: # export MAVEN_OPTS="-Xms256m -Xmx256m" mvn clean package -Popendj I was able to run the mvn command using an Xmx of 256m. During test phase Maven starts an opendj server using an ant task. Looking at misc/build-runldap.xml, you'll see it can use up to 512M memory. When added, Mvn + Opendj Xmx parameters should be lower than your system memory limit. Regards. -- Soisik Froger | Software Architect soisik.fro...@worteks.com Worteks | https://www.worteks.com _______________________________________________________________ Ldap Synchronization Connector (LSC) - http://lsc-project.org lsc-users mailing list lsc-users@lists.lsc-project.org https://lists.lsc-project.org/cgi-bin/mailman/listinfo/lsc-users