2 Replies Latest reply on May 5, 2010 7:32 AM by Hardy Massen

    java.lang.OutOfMemoryError: Java heap space while trying to build GateIn from SVN

    Hardy Massen Novice

      Hi,

       

      while trying to build GateIn from the svn-code (mvn clean install) I get a java.lang.OutOfMemoryError. (Stack-trace appended).

      The system runs Windows XP. Inreasing the maven-memory doesn't help.

       

      Any idea what causes the problem?

       

      Regards,

       

      LeoLo

       

      [INFO] ------------------------------------------------------------------------
      [INFO] Building GateIn Portal Component Web
      [INFO]    task-segment: [clean, install]
      [INFO] ------------------------------------------------------------------------
      [INFO] [clean:clean {execution: default-clean}]
      Downloading: https://maven-repository.dev.java.net/repository/org.jboss.ejb3/poms/jboss-ejb3-security-1.0.0.pom
      [INFO] ------------------------------------------------------------------------
      [ERROR] FATAL ERROR
      [INFO] ------------------------------------------------------------------------
      [INFO] Java heap space
      [INFO] ------------------------------------------------------------------------
      [INFO] Trace
      java.lang.OutOfMemoryError: Java heap space
          at java.io.WinNTFileSystem.list(Native Method)
          at java.io.File.list(File.java:973)
          at javax.crypto.SunJCE_b.j(DashoA13*..)
          at javax.crypto.SunJCE_b.d(DashoA13*..)
          at javax.crypto.SunJCE_b.c(DashoA13*..)
          at javax.crypto.SunJCE_b$1.run(DashoA13*..)
          at java.security.AccessController.doPrivileged(Native Method)
          at javax.crypto.SunJCE_b.<clinit>(DashoA13*..)
          at javax.crypto.Cipher.getInstance(DashoA13*..)
          at com.sun.net.ssl.internal.ssl.JsseJce.getCipher(JsseJce.java:180)
          at com.sun.net.ssl.internal.ssl.CipherBox.<init>(CipherBox.java:80)
          at com.sun.net.ssl.internal.ssl.CipherBox.newCipherBox(CipherBox.java:113)
          at com.sun.net.ssl.internal.ssl.CipherSuite$BulkCipher.newCipher(CipherSuite.java:350)
          at com.sun.net.ssl.internal.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:387)
          at com.sun.net.ssl.internal.ssl.CipherSuite$BulkCipher.isAvailable(CipherSuite.java:367)
          at com.sun.net.ssl.internal.ssl.CipherSuite.isAvailable(CipherSuite.java:143)
          at com.sun.net.ssl.internal.ssl.CipherSuiteList.buildAvailableCache(CipherSuiteList.java:210)
          at com.sun.net.ssl.internal.ssl.CipherSuiteList.getDefault(CipherSuiteList.java:233)
          at com.sun.net.ssl.internal.ssl.SSLSocketImpl.init(SSLSocketImpl.java:508)
          at com.sun.net.ssl.internal.ssl.SSLSocketImpl.<init>(SSLSocketImpl.java:451)
          at com.sun.net.ssl.internal.ssl.SSLSocketFactoryImpl.createSocket(SSLSocketFactoryImpl.java:56)
          at sun.net.www.protocol.https.HttpsClient.createSocket(HttpsClient.java:362)
          at sun.net.NetworkClient.doConnect(NetworkClient.java:145)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
          at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
          at sun.net.www.protocol.https.HttpsClient.<init>(HttpsClient.java:272)
          at sun.net.www.protocol.https.HttpsClient.New(HttpsClient.java:329)
          at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(AbstractDelegateHttpsURLConnection.java:172)
          at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
          at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:158)
          at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1049)
          at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
      [INFO] ------------------------------------------------------------------------
      [INFO] Total time: 2 minutes 27 seconds
      [INFO] Finished at: Tue May 04 16:38:55 CEST 2010
      [INFO] Final Memory: 63M/63M
      [INFO] ------------------------------------------------------------------------

        • 1. Re: java.lang.OutOfMemoryError: Java heap space while trying to build GateIn from SVN
          Boleslaw Dawidowicz Master

          What do you have in $MAVEN_OPTS? I'm able to build on linux with "-Xmx512m -XX:PermSize=128m" using maven 2.2.1. I have seen such issue previously only when building with clean local repo (~/.m2/repository) as there are plenty of dependencies to download on the first after second run it should be ok.  Which memory settings did you try? Does it break always in the same place?

          1 of 1 people found this helpful
          • 2. Re: java.lang.OutOfMemoryError: Java heap space while trying to build GateIn from SVN
            Hardy Massen Novice

            Hi Boris,

             

            thanks for your hints.

             

            I've worked through a couple of local maven-issues (a bunch of broken repository-files, wrong maven_opts-settings, missing repositories, etc.) and now the "mvn install" succeeds.

             

            But when I execeute maven with tests I get the following exceptions:

             

            -------------------------------------------------------
            T E S T S
            -------------------------------------------------------
            Running org.exoplatform.component.test.BootstrapTestCase
            Can't load log handler "java.util.logging.FileHandler"
            java.io.IOException: Couldn't get lock for C:javagateincomponenttestcore/target/gateintest-%u.log
            java.io.IOException: Couldn't get lock for C:javagateincomponenttestcore/target/gateintest-%u.log

                at java.util.logging.FileHandler.openFiles(FileHandler.java:372)
                at java.util.logging.FileHandler.<init>(FileHandler.java:208)

            [...]

            (Full maven-log appended)

             

            Looks like a path-separator-issue to me (slash vs. backslash).

             

            Any idea, how to fix this?

             

            Regards,

             

            LeoLo

             

             

            [INFO] Scanning for projects...
            [INFO] Reactor build order:
            [INFO]   GateIn - Portal
            [INFO]   GateIn Portal Component
            [INFO]   GateIn Portal Test Component
            [INFO]   GateIn Portal Component Core Test
            [INFO]   GateIn Portal Component Core Test JCR
            [INFO]   GateIn Portal Component JBoss IDM integration
            [INFO]   GateIn Portal Component Core Test Organization
            [INFO]   GateIn Portal Component Common
            [INFO]   GateIn Portal Component Resources
            [INFO]   GateIn Portal Component PC integration
            [INFO]   GateIn Portal Component XML Parser
            [INFO]   GateIn Portal Component WSRP integration
            [INFO]   GateIn Portal Component Scripting
            [INFO]   GateIn Portal Component Web
            [INFO]   GateIn Portal Component Portal Data
            [INFO]   GateIn Portal Component Application Registry
            [INFO]   GateIn Portal Component Management
            [INFO]   GateIn Portal WebUI
            [INFO]   GateIn Portal WebUI Core
            [INFO]   GateIn Portal WebUI eXo
            [INFO]   GateIn Portal eXo Gadgets
            [INFO]   GateIn Portal eXo Gadgets Core
            [INFO]   GateIn Portal WebUI Portal
            [INFO]   GateIn Portal Component Dashboard Portlet
            [INFO]   GateIn Portal eXo Gadgets Server
            [INFO]   GateIn Portal eXo Gadgets Application
            [INFO]   GateIn Portal Portlet
            [INFO]   GateIn Portal Portlet Dashboard
            [INFO]   GateIn Portal Portlet eXoAdmin
            [INFO]   GateIn Portal Portlet Web
            [INFO]   GateIn Portal Portlet
            [INFO]   GateIn Portal Web Resources
            [INFO]   GateIn Portal Web Module
            [INFO]   GateIn Portal Web REST application
            [INFO]   GateIn Portal Server
            [INFO]   GateIn Portal Server Tomcat
            [INFO]   GateIn Portal Server Tomcat Patch
            [INFO]   GateIn Portal Server Tomcat Plugin
            [INFO]   GateIn Portal Server JBoss
            [INFO]   GateIn Portal Server JBoss EAR Patch
            [INFO]   GateIn Portal Server JBoss Plugin
            [INFO]   GateIn Portal Sample Extension Configuration
            [INFO]   GateIn Portal Sample Extension Java Classes
            [INFO]   GateIn Portal Sample Extension War
            [INFO]   GateIn Portal Sample Extension Ear
            [INFO]   GateIn Portal Sample Extension
            [INFO]   GateIn Portal Sample Portal Configuration
            [INFO]   GateIn Portal Sample Portal Java Classes
            [INFO]   GateIn Portal Sample Portal War
            [INFO]   GateIn Portal Sample Portal Rest War
            [INFO]   GateIn Portal Sample Portal Ear
            [INFO]   GateIn Portal Sample Portal
            [INFO]   GateIn Portal Examples - Portlets
            [INFO]   GateIn Portal Examples - JSF Hello User Portlet
            [INFO]   GateIn Portal Examples - JSP Hello User Portlet
            [INFO]   GateIn Portal Examples - Simplest Hello World Portlet
            [INFO]   GateIn Portlet Examples - Struts JPetstore
            [INFO]   GateIn Skins
            [INFO]   GateIn Simple Deployable Skin
            [INFO]   GateIn Portal Sample
            [INFO]   GateIn Portal Starter War
            [INFO]   GateIn Portal Starter Ear
            [INFO]   GateIn Portal Starter
            [INFO]   GateIn Portal Packaging
            [INFO]   GateIn Portal Packaging Module
            [INFO]   GateIn Portal Packaging Product
            [INFO]   GateIn Portal Packaging Assemblies
            [INFO]   GateIn Portal Tattletale reports
            [INFO]   TestSuite for GateIn
            [INFO]   Selenium Sniff Test for GateIn
            [INFO]   GateIn Portal Examples - WebUI based samples
            [INFO] ------------------------------------------------------------------------
            [INFO] Building GateIn - Portal
            [INFO]    task-segment: [install]
            [INFO] ------------------------------------------------------------------------
            [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
            [INFO] [enforcer:enforce {execution: enforce-java-version}]
            [INFO] [enforcer:enforce {execution: enforce-maven-version}]
            [INFO] [antrun:run {execution: compile}]
            [INFO] Executing tasks
            [INFO] Executed tasks
            [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
            [INFO] [source:jar-no-fork {execution: attach-sources}]
            [INFO] [install:install {execution: default-install}]
            [INFO] Installing C:\java\gatein\pom.xml to C:\HOME\.m2\repository\org\exoplatform\portal\exo.portal.parent\3.0.1-GA-SNAPSHOT\exo.portal.parent-3.0.1-GA-SNAPSHOT.pom
            [INFO] ------------------------------------------------------------------------
            [INFO] Building GateIn Portal Component
            [INFO]    task-segment: [install]
            [INFO] ------------------------------------------------------------------------
            [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
            [INFO] [enforcer:enforce {execution: enforce-java-version}]
            [INFO] [enforcer:enforce {execution: enforce-maven-version}]
            [INFO] [antrun:run {execution: compile}]
            [INFO] Executing tasks
            [INFO] Executed tasks
            [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
            [INFO] [source:jar-no-fork {execution: attach-sources}]
            [INFO] [install:install {execution: default-install}]
            [INFO] Installing C:\java\gatein\component\pom.xml to C:\HOME\.m2\repository\org\exoplatform\portal\exo.portal.component\3.0.1-GA-SNAPSHOT\exo.portal.component-3.0.1-GA-SNAPSHOT.pom
            [INFO] ------------------------------------------------------------------------
            [INFO] Building GateIn Portal Test Component
            [INFO]    task-segment: [install]
            [INFO] ------------------------------------------------------------------------
            [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
            [INFO] [enforcer:enforce {execution: enforce-java-version}]
            [INFO] [enforcer:enforce {execution: enforce-maven-version}]
            [INFO] [antrun:run {execution: compile}]
            [INFO] Executing tasks
            [INFO] Executed tasks
            [INFO] [site:attach-descriptor {execution: default-attach-descriptor}]
            [INFO] [source:jar-no-fork {execution: attach-sources}]
            [INFO] [install:install {execution: default-install}]
            [INFO] Installing C:\java\gatein\component\test\pom.xml to C:\HOME\.m2\repository\org\exoplatform\portal\exo.portal.component.test\3.0.1-GA-SNAPSHOT\exo.portal.component.test-3.0.1-GA-SNAPSHOT.pom
            [INFO] ------------------------------------------------------------------------
            [INFO] Building GateIn Portal Component Core Test
            [INFO]    task-segment: [install]
            [INFO] ------------------------------------------------------------------------
            [INFO] [enforcer:enforce {execution: enforce-plugin-versions}]
            [INFO] [enforcer:enforce {execution: enforce-java-version}]
            [INFO] [enforcer:enforce {execution: enforce-maven-version}]
            [INFO] [resources:resources {execution: default-resources}]
            [INFO] Using 'UTF-8' encoding to copy filtered resources.
            [INFO] Copying 3 resources
            [INFO] [compiler:compile {execution: default-compile}]
            [INFO] Compiling 1 source file to C:\java\gatein\component\test\core\target\classes
            [INFO] [antrun:run {execution: compile}]
            [INFO] Executing tasks
            [INFO] Executed tasks
            [INFO] [resources:testResources {execution: default-testResources}]
            [INFO] Using 'UTF-8' encoding to copy filtered resources.
            [INFO] Copying 0 resource
            [INFO] Copying 1 resource
            [INFO] [compiler:testCompile {execution: default-testCompile}]
            [INFO] Nothing to compile - all classes are up to date
            [INFO] [surefire:test {execution: default-test}]
            [INFO] Surefire report directory: C:\java\gatein\component\test\core\target\surefire-reports

             

            -------------------------------------------------------
            T E S T S
            -------------------------------------------------------
            Running org.exoplatform.component.test.BootstrapTestCase
            Can't load log handler "java.util.logging.FileHandler"
            java.io.IOException: Couldn't get lock for C:javagateincomponenttestcore/target/gateintest-%u.log
            java.io.IOException: Couldn't get lock for C:javagateincomponenttestcore/target/gateintest-%u.log
                at java.util.logging.FileHandler.openFiles(FileHandler.java:372)
                at java.util.logging.FileHandler.<init>(FileHandler.java:208)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
                at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
                at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
                at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
                at java.lang.Class.newInstance0(Class.java:355)
                at java.lang.Class.newInstance(Class.java:308)
                at java.util.logging.LogManager$7.run(LogManager.java:919)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.util.logging.LogManager.initializeGlobalHandlers(LogManager.java:911)
                at java.util.logging.LogManager.access$900(LogManager.java:129)
                at java.util.logging.LogManager$RootLogger.getHandlers(LogManager.java:1018)
                at java.util.logging.Logger.log(Logger.java:454)
                at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:587)
                at org.slf4j.impl.JDK14LoggerAdapter.log(JDK14LoggerAdapter.java:659)
                at org.gatein.common.logging.SLF4JLocationAwareLogger.doLog(SLF4JLocationAwareLogger.java:44)
                at org.gatein.common.logging.Logger.log(Logger.java:51)
                at org.gatein.common.logging.Logger.info(Logger.java:115)
                at org.exoplatform.component.test.AbstractGateInTest.runBare(AbstractGateInTest.java:71)
                at junit.framework.TestResult$1.protect(TestResult.java:106)
                at junit.framework.TestResult.runProtected(TestResult.java:124)
                at junit.framework.TestResult.run(TestResult.java:109)
                at junit.framework.TestCase.run(TestCase.java:118)
                at junit.framework.TestSuite.runTest(TestSuite.java:208)
                at junit.framework.TestSuite.run(TestSuite.java:203)
                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:597)
                at org.apache.maven.surefire.junit.JUnitTestSet.execute(JUnitTestSet.java:213)
                at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.executeTestSet(AbstractDirectoryTestSuite.java:140)
                at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.execute(AbstractDirectoryTestSuite.java:127)
                at org.apache.maven.surefire.Surefire.run(Surefire.java:177)
                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:597)
                at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
                at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
            [13:13:13-931][INFO] BootstrapTestCase Running unit test:testRequestLifeCycle
            [13:13:14-056][INFO] RootContainer Building root container
            [13:13:14-150][INFO] RootContainer Active profiles [standalone]
            [13:13:14-150][INFO] AbstractGateInTest About to load root configuration
            [13:13:14-150][INFO] AbstractGateInTest Want to load for resource named conf/root-configuration.xml the urls [file:/C:/java/gatein/component/test/core/target/classes/conf/root-configuration.xml]
            [13:13:14-259][INFO] RootContainer Root container is built (build time 203ms)
            [13:13:14-259][INFO] ExoContainerContext Set the top container in its context
            [13:13:14-259][INFO] RootContainer Root container booted
            [13:13:14-275][INFO] AbstractGateInTest About to load portal configuration
            [13:13:14-275][INFO] AbstractGateInTest Want to load for resource named conf/portal-configuration.xml the urls [file:/C:/java/gatein/component/test/core/target/classes/conf/portal-configuration.xml]
            [13:13:14-275][INFO] AbstractGateInTest Want to load for resource named conf/test-configuration.xml the urls [file:/C:/java/gatein/component/test/core/target/test-classes/conf/test-configuration.xml]
            [13:13:14-275][INFO] AbstractGateInTest Want to load for resource named conf/jcr/jcr-configuration.xml the urls []
            [13:13:14-322][INFO] BootstrapTestCase Unit test testRequestLifeCycle completed
            [13:13:14-337][INFO] BootstrapTestCase Running unit test:testDataSource
            [13:13:14-337][INFO] InitialContextInitializer Using mandatory system property: java.naming.factory.initial = org.exoplatform.services.naming.SimpleContextFactory
            [13:13:14-353][INFO] InitialContextInitializer Reference bound: jdbcexo
            [13:13:14-540][INFO] BootstrapTestCase Using database HSQL Database Engine 1.8.0.1.8 with driver HSQL Database Engine Driver 1.8.0.1.8
            [13:13:14-540][INFO] BootstrapTestCase Unit test testDataSource completed
            [13:13:14-540][INFO] BootstrapTestCase Running unit test:testTmpDir1
            [13:13:14-540][INFO] BootstrapTestCase Unit test testTmpDir1 completed
            [13:13:14-540][INFO] BootstrapTestCase Running unit test:testTmpDir2
            [13:13:14-556][INFO] BootstrapTestCase Unit test testTmpDir2 completed
            Tests run: 4, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.703 sec

             

            Results :

             

            Tests run: 4, Failures: 0, Errors: 0, Skipped: 0

             

            [INFO] [jar:jar {execution: default-jar}]
            [INFO] [source:jar-no-fork {execution: attach-sources}]
            [INFO] [install:install {execution: default-install}]
            [INFO] Installing C:\java\gatein\component\test\core\target\exo.portal.component.test.core-3.0.1-GA-SNAPSHOT.jar to C:\HOME\.m2\repository\org\exoplatform\portal\exo.portal.component.test.core\3.0.1-GA-SNAPSHOT\exo.portal.component.test.core-3.0.1-GA-SNAPSHOT.jar
            [INFO] Installing C:\java\gatein\component\test\core\target\exo.portal.component.test.core-3.0.1-GA-SNAPSHOT-sources.jar to C:\HOME\.m2\repository\org\exoplatform\portal\exo.portal.component.test.core\3.0.1-GA-SNAPSHOT\exo.portal.component.test.core-3.0.1-GA-SNAPSHOT-sources.jar
            [INFO] ------------------------------------------------------------------------
            [INFO] Building GateIn Portal Component Core Test JCR
            [INFO]    task-segment: [install]
            [INFO] ------------------------------------------------------------------------