AnsweredAssumed Answered

Jeff Potts tutorial, OutOfMemoryError: PermGen space

Question asked by hynlos on Jun 10, 2014
Latest reply on Jun 12, 2014 by hynlos
Hi, I'm following the tutorial of Jeff Potts and I'm stick on second part when I'm tring to start the repo project to test new share aspects and types with command

mvn integration-test -Pamp-to-war

I get OutOfMemoryError: PermGen space.
How can I increase permgen space?

This is the output.


[INFO] Scanning for projects…
[INFO]
[INFO] Using the builder org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder with a thread count of 1
[INFO]                                                                        
[INFO] ————————————————————————
[INFO] Building content-tutorial-repo AMP project 1.0-SNAPSHOT
[INFO] ————————————————————————
[INFO]
[INFO] — alfresco-maven-plugin:1.1.1:set-version (default-set-version) @ content-tutorial-repo —
[INFO] Removed -SNAPSHOT suffix from version - 1.0
[INFO] Added timestamp to version - 1.0.1406101058
[INFO]
[INFO] — build-helper-maven-plugin:1.8:add-test-resource (add-env-test-properties) @ content-tutorial-repo —
[INFO]
[INFO] — maven-resources-plugin:2.6:resources (default-resources) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mattia/workspace/AlfrescoTutorial/content-tutorial-repo/src/main/resources
[INFO] Copying 10 resources to ../content-tutorial-repo
[INFO]
[INFO] — maven-compiler-plugin:3.1:compile (default-compile) @ content-tutorial-repo —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-resources-plugin:2.6:testResources (default-testResources) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource
[INFO] Copying 1 resource
[INFO]
[INFO] — maven-resources-plugin:2.6:copy-resources (prepare-amp-testing-classpath) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 4 resources
[INFO]
[INFO] — maven-compiler-plugin:3.1:testCompile (default-testCompile) @ content-tutorial-repo —
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] — maven-surefire-plugin:2.16:test (default-test) @ content-tutorial-repo —
[INFO] Tests are skipped.
[INFO]
[INFO] — maven-dependency-plugin:2.8:unpack (unpack-alfresco) @ content-tutorial-repo —
[INFO] Configured Artifact: org.alfresco:alfresco:4.2.e:war
[INFO] alfresco-4.2.e.war already unpacked.
[INFO]
[INFO] — maven-resources-plugin:2.6:copy-resources (copy-alfresco-test-resources) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory /home/mattia/workspace/AlfrescoTutorial/content-tutorial-repo/src/test/webapp
[INFO] Copying 7 resources to WEB-INF/classes
[INFO] Copying 1 resource to WEB-INF/classes
[INFO]
[INFO] — maven-resources-plugin:2.6:copy-resources (copy-tomcat-resources) @ content-tutorial-repo —
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 1 resource to WEB-INF
[INFO]
[INFO] — alfresco-maven-plugin:1.1.1:amp (default-amp) @ content-tutorial-repo —
[INFO] Building jar: /home/mattia/workspace/AlfrescoTutorial/content-tutorial-repo/target/content-tutorial-repo/lib/content-tutorial-repo.jar
[INFO] Adding directory to AMP package [ '/home/mattia/workspace/AlfrescoTutorial/content-tutorial-repo/target/content-tutorial-repo' '']
[INFO] Building amp: /home/mattia/workspace/AlfrescoTutorial/content-tutorial-repo/target/content-tutorial-repo.amp
[INFO]
[INFO] — alfresco-maven-plugin:1.1.1:install (amps-to-war-overlay) @ content-tutorial-repo —
   - WARNING: The file '/WEB-INF/classes/alfresco/module/content-tutorial-repo/model/scModel.xml' is being overwritten by this module. The original has been backed-up to '/WEB-INF/classes/alfresco/module/backup/6de550ff-f07d-11e3-aecf-636713c7bc24.bin'
   - WARNING: The file '/WEB-INF/classes/alfresco/module/content-tutorial-repo/context/service-context.xml' is being overwritten by this module. The original has been backed-up to '/WEB-INF/classes/alfresco/module/backup/6de59f20-f07d-11e3-aecf-636713c7bc24.bin'
   - WARNING: The file '/WEB-INF/classes/alfresco/module/content-tutorial-repo/module-context.xml' is being overwritten by this module. The original has been backed-up to '/WEB-INF/classes/alfresco/module/backup/6de5c631-f07d-11e3-aecf-636713c7bc24.bin'
   - WARNING: The file '/WEB-INF/classes/alfresco/module/content-tutorial-repo/log4j.properties' is being overwritten by this module. The original has been backed-up to '/WEB-INF/classes/alfresco/module/backup/6de5ed42-f07d-11e3-aecf-636713c7bc24.bin'
[INFO]
[INFO] — tomcat7-maven-plugin:2.1:run-war-only (run-wars) @ content-tutorial-repo —
[INFO] Running war on http://localhost:8080/content-tutorial-repo
[INFO] Using existing Tomcat server configuration at /home/mattia/workspace/AlfrescoTutorial/content-tutorial-repo/target/tomcat
[INFO] create webapp with contextPath: /alfresco
giu 10, 2014 10:58:46 AM org.apache.coyote.AbstractProtocol init
INFORMAZIONI: Initializing ProtocolHandler ["http-bio-8080"]
giu 10, 2014 10:58:46 AM org.apache.catalina.core.StandardService startInternal
INFORMAZIONI: Starting service Tomcat
giu 10, 2014 10:58:46 AM org.apache.catalina.core.StandardEngine startInternal
INFORMAZIONI: Starting Servlet Engine: Apache Tomcat/7.0.37
giu 10, 2014 10:58:51 AM org.apache.catalina.startup.TaglibUriRule body
INFORMAZIONI: TLD skipped. URI: http://java.sun.com/jsp/jstl/core is already defined
giu 10, 2014 10:58:51 AM org.apache.catalina.core.StandardContext addApplicationListener
INFORMAZIONI: The listener "org.apache.myfaces.webapp.StartupServletContextListener" is already configured for this context. The duplicate definition has been ignored.
giu 10, 2014 10:58:52 AM org.apache.catalina.core.ApplicationContext log
INFORMAZIONI: Initializing Spring root WebApplicationContext
2014-06-10 10:58:55,745  INFO  [alfresco.repo.admin] [localhost-startStop-1] Using database URL 'jdbc:h2:./alf_data_dev/h2_data/alf_dev;MODE=PostgreSQL;AUTO_SERVER=TRUE;DB_CLOSE_ON_EXIT=FALSE;LOCK_TIMEOUT=10000;MVCC=TRUE' with user 'alfresco'.
2014-06-10 10:58:56,416  INFO  [alfresco.repo.admin] [localhost-startStop-1] Connected to database H2 version 1.3.174 (2013-10-19)
2014-06-10 10:59:01,464  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Starting 'sysAdmin' subsystem, ID: [sysAdmin, default]
2014-06-10 10:59:01,482  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Startup of 'sysAdmin' subsystem, ID: [sysAdmin, default] complete
2014-06-10 10:59:07,464  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopping 'sysAdmin' subsystem, ID: [sysAdmin, default]
2014-06-10 10:59:07,464  INFO  [management.subsystems.ChildApplicationContextFactory] [localhost-startStop-1] Stopped 'sysAdmin' subsystem, ID: [sysAdmin, default]
Exception in thread "RMI RenewClean-[127.0.1.1:50508]"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "RMI RenewClean-[127.0.1.1:50508]"
giu 10, 2014 10:59:08 AM org.apache.catalina.core.ContainerBase startInternal
GRAVE: A child container failed during start
java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: PermGen space
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.OutOfMemoryError: PermGen space
        at org.apache.log4j.spi.LoggingEvent.<init>(LoggingEvent.java:159)
        at org.apache.log4j.Category.forcedLog(Category.java:391)
        at org.apache.log4j.Category.log(Category.java:856)
        at org.apache.commons.logging.impl.Log4JLogger.error(Log4JLogger.java:257)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:220)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:47)
        at org.alfresco.web.app.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:63)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4797)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5291)
        … 7 more

giu 10, 2014 10:59:08 AM org.apache.catalina.core.ContainerBase startInternal
GRAVE: A child container failed during start
java.util.concurrent.ExecutionException: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
        at java.util.concurrent.FutureTask.report(FutureTask.java:122)
        at java.util.concurrent.FutureTask.get(FutureTask.java:188)
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1123)
        at org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:302)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardService.startInternal(StandardService.java:443)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:732)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        at org.apache.catalina.startup.Tomcat.start(Tomcat.java:335)
        at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.startContainer(AbstractRunMojo.java:1091)
        at org.apache.tomcat.maven.plugin.tomcat7.run.AbstractRunMojo.execute(AbstractRunMojo.java:512)
        at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:133)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
        at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:108)
        at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:76)
        at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
        at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:116)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
        at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
        at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
        at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
        at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
        at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: org.apache.catalina.LifecycleException: Failed to start component [StandardEngine[Tomcat].StandardHost[localhost]]
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:154)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
        at java.util.concurrent.FutureTask.run(FutureTask.java:262)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
        at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.catalina.LifecycleException: A child container failed during start
        at org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:1131)
        at org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:800)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
        … 6 more

[INFO] ————————————————————————
[INFO] BUILD SUCCESS
[INFO] ————————————————————————
[INFO] Total time: 26.955 s
[INFO] Finished at: 2014-06-10T10:59:09+01:00
[INFO] Final Memory: 83M/1849M
[INFO] ————————————————————————
—————————————————
constituent[0]: file:/usr/share/maven3/lib/maven-compat-3.2.1.jar
constituent[1]: file:/usr/share/maven3/lib/plexus-utils-3.0.17.jar
constituent[2]: file:/usr/share/maven3/lib/maven-settings-builder-3.2.1.jar
constituent[3]: file:/usr/share/maven3/lib/javax.inject-1.jar
constituent[4]: file:/usr/share/maven3/lib/maven-model-builder-3.2.1.jar
constituent[5]: file:/usr/share/maven3/lib/org.eclipse.sisu.inject-0.0.0.M5.jar
constituent[6]: file:/usr/share/maven3/lib/wagon-file-2.6.jar
constituent[7]: file:/usr/share/maven3/lib/commons-io-2.2.jar
constituent[8]: file:/usr/share/maven3/lib/guava-14.0.1.jar
constituent[9]: file:/usr/share/maven3/lib/sisu-guice-3.1.3-no_aop.jar
constituent[10]: file:/usr/share/maven3/lib/maven-model-3.2.1.jar
constituent[11]: file:/usr/share/maven3/lib/plexus-sec-dispatcher-1.3.jar
constituent[12]: file:/usr/share/maven3/lib/wagon-http-shared-2.6.jar
constituent[13]: file:/usr/share/maven3/lib/plexus-cipher-1.7.jar
constituent[14]: file:/usr/share/maven3/lib/maven-plugin-api-3.2.1.jar
constituent[15]: file:/usr/share/maven3/lib/wagon-http-2.6-shaded.jar
constituent[16]: file:/usr/share/maven3/lib/maven-artifact-3.2.1.jar
constituent[17]: file:/usr/share/maven3/lib/org.eclipse.sisu.plexus-0.0.0.M5.jar
constituent[18]: file:/usr/share/maven3/lib/maven-repository-metadata-3.2.1.jar
constituent[19]: file:/usr/share/maven3/lib/maven-aether-provider-3.2.1.jar
constituent[20]: file:/usr/share/maven3/lib/aether-spi-0.9.0.M2.jar
constituent[21]: file:/usr/share/maven3/lib/cdi-api-1.0.jar
constituent[22]: file:/usr/share/maven3/lib/aether-api-0.9.0.M2.jar
constituent[23]: file:/usr/share/maven3/lib/maven-embedder-3.2.1.jar
constituent[24]: file:/usr/share/maven3/lib/plexus-interpolation-1.19.jar
constituent[25]: file:/usr/share/maven3/lib/slf4j-simple-1.7.5.jar
constituent[26]: file:/usr/share/maven3/lib/maven-core-3.2.1.jar
constituent[27]: file:/usr/share/maven3/lib/aether-impl-0.9.0.M2.jar
constituent[28]: file:/usr/share/maven3/lib/wagon-provider-api-2.6.jar
constituent[29]: file:/usr/share/maven3/lib/aether-connector-wagon-0.9.0.M2.jar
constituent[30]: file:/usr/share/maven3/lib/plexus-component-annotations-1.5.5.jar
constituent[31]: file:/usr/share/maven3/lib/jsoup-1.7.2.jar
constituent[32]: file:/usr/share/maven3/lib/aether-util-0.9.0.M2.jar
constituent[33]: file:/usr/share/maven3/lib/commons-lang-2.6.jar
constituent[34]: file:/usr/share/maven3/lib/maven-settings-3.2.1.jar
constituent[35]: file:/usr/share/maven3/lib/commons-cli-1.2.jar
constituent[36]: file:/usr/share/maven3/lib/slf4j-api-1.7.5.jar
constituent[37]: file:/usr/share/maven3/lib/aopalliance-1.0.jar
constituent[38]: file:/usr/share/maven3/lib/jsr250-api-1.0.jar
constituent[39]: file:/usr/share/maven3/conf/logging/
—————————————————
Exception in thread "main"
Exception: java.lang.OutOfMemoryError thrown from the UncaughtExceptionHandler in thread "main"

Outcomes