java.lang.OutOfMemoryError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • We are seeing intermittent failures of our maven builds for a particular project caused by memory issues. The following error log falls out on the last component that is compiled in the project: build 18-Nov-2013 09:10:10 [INFO] ------------------------------------------------------------- build 18-Nov-2013 09:10:10 [ERROR] COMPILATION ERROR : build 18-Nov-2013 09:10:10 [INFO] ------------------------------------------------------------- build 18-Nov-2013 09:10:10 [ERROR] Failure executing javac, but could not parse the error: build 18-Nov-2013 09:10:10 build 18-Nov-2013 09:10:10 build 18-Nov-2013 09:10:10 The system is out of resources. build 18-Nov-2013 09:10:10 Consult the following stack trace for details. build 18-Nov-2013 09:10:10 java.lang.OutOfMemoryError: PermGen space build 18-Nov-2013 09:10:10 at com.sun.tools.javac.comp.Check.<init>(Check.java:836) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.comp.Check.instance(Check.java:86) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.code.Types.<init>(Types.java:101) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.code.Types.instance(Types.java:88) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:264) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:226) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:331) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:88) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:424) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:353) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:342) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:333) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.Main.compile(Main.java:94) build 18-Nov-2013 09:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) build 18-Nov-2013 09:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) build 18-Nov-2013 09:10:10 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) build 18-Nov-2013 09:10:10 at java.lang.reflect.Method.invoke(Method.java:606) build 18-Nov-2013 09:10:10 at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554) build 18-Nov-2013 09:10:10 at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161) build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605) build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161) build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) build 18-Nov-2013 09:10:10 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) build 18-Nov-2013 09:10:10 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) build 18-Nov-2013 09:10:10 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) We are running Bamboo 4.4.4 build 3506 with the following Maven and Java versions: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500) Maven home: /usr/share/maven3 Java version: 1.7.0_40, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-oracle/jre Default locale: en_CA, platform encoding: UTF-8 OS name: "linux", version: "3.2.0-53-generic", arch: "amd64", family: "unix" The contents of our wrapper.conf file are attached. I've tried rebuilding a number of times but the system seems to be stuck on lack of resources. Here is a "free -m" output from the Ubuntu server running our Bamboo: total used free shared buffers cached Mem: 32173 27268 4904 0 530 20528 -/+ buffers/cache: 6209 25964 Swap: 17409 19 17390
    via by Maurice Romaniuk,
  • We are seeing intermittent failures of our maven builds for a particular project caused by memory issues. The following error log falls out on the last component that is compiled in the project: build 18-Nov-2013 09:10:10 [INFO] ------------------------------------------------------------- build 18-Nov-2013 09:10:10 [ERROR] COMPILATION ERROR : build 18-Nov-2013 09:10:10 [INFO] ------------------------------------------------------------- build 18-Nov-2013 09:10:10 [ERROR] Failure executing javac, but could not parse the error: build 18-Nov-2013 09:10:10 build 18-Nov-2013 09:10:10 build 18-Nov-2013 09:10:10 The system is out of resources. build 18-Nov-2013 09:10:10 Consult the following stack trace for details. build 18-Nov-2013 09:10:10 java.lang.OutOfMemoryError: PermGen space build 18-Nov-2013 09:10:10 at com.sun.tools.javac.comp.Check.<init>(Check.java:836) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.comp.Check.instance(Check.java:86) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.code.Types.<init>(Types.java:101) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.code.Types.instance(Types.java:88) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:264) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:226) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:331) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:88) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:424) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:353) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:342) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.main.Main.compile(Main.java:333) build 18-Nov-2013 09:10:10 at com.sun.tools.javac.Main.compile(Main.java:94) build 18-Nov-2013 09:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) build 18-Nov-2013 09:10:10 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) build 18-Nov-2013 09:10:10 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) build 18-Nov-2013 09:10:10 at java.lang.reflect.Method.invoke(Method.java:606) build 18-Nov-2013 09:10:10 at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554) build 18-Nov-2013 09:10:10 at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161) build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605) build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161) build 18-Nov-2013 09:10:10 at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) build 18-Nov-2013 09:10:10 at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) build 18-Nov-2013 09:10:10 at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) build 18-Nov-2013 09:10:10 at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) build 18-Nov-2013 09:10:10 at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537) We are running Bamboo 4.4.4 build 3506 with the following Maven and Java versions: Apache Maven 3.0.4 (r1232337; 2012-01-17 03:44:56-0500) Maven home: /usr/share/maven3 Java version: 1.7.0_40, vendor: Oracle Corporation Java home: /usr/lib/jvm/java-7-oracle/jre Default locale: en_CA, platform encoding: UTF-8 OS name: "linux", version: "3.2.0-53-generic", arch: "amd64", family: "unix" The contents of our wrapper.conf file are attached. I've tried rebuilding a number of times but the system seems to be stuck on lack of resources. Here is a "free -m" output from the Ubuntu server running our Bamboo: total used free shared buffers cached Mem: 32173 27268 4904 0 530 20528 -/+ buffers/cache: 6209 25964 Swap: 17409 19 17390
    via by Maurice Romaniuk,
  • GitHub comment 26#70710961
    via GitHub by rc-34
    ,
  • Sonar Server: Linux sonar 2.6.16.46-0.12-smp #1 SMP Thu May 17 14:00:09 UTC 2007 x86_64 x86_64 x86_64 GNU/Linux BD: Postgres Build Machine: Windows Project: Multi Module Maven: 2.1.0 Maven Opts: MAVEN_OPTS="-Xmx2048m -Xms256m -XX:MaxPermSize=2048M" Bild params: maven compile sonar:sonar -Dsonar.jdbc.url=jdbc:postgresql://.../sonar_db -Dsonar.jdbc.username=... -Dsonar.jdbc.password=... -Dsonar.jdbc.driver=org.postgresql.Driver -Dsonar.host.url=http://...:9000/ The exception it fails with: [INFO] Instrumentation was successful. [INFO] [resources:testResources] [INFO] Using default encoding to copy filtered resources. [INFO] [compiler:testCompile] [INFO] Compiling 8 source files to D:\Bamboo2\xml-data\build-dir\XXX\yyy\target\test-classes [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Can not execute Sonar Embedded error: Unable to execute maven plugin Compilation failure Failure executing javac, but could not parse the error: The system is out of resources. Consult the following stack trace for details. java.lang.OutOfMemoryError: PermGen space at com.sun.tools.javac.tree.TreeMaker.Annotation(TreeMaker.java:437) at com.sun.tools.javac.parser.Parser.annotation(Parser.java:1949) at com.sun.tools.javac.parser.Parser.modifiersOpt(Parser.java:1912) at com.sun.tools.javac.parser.Parser.typeDeclaration(Parser.java:2180) at com.sun.tools.javac.parser.Parser.compilationUnit(Parser.java:2126) at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:509) at com.sun.tools.javac.main.JavaCompiler.parse(JavaCompiler.java:550) at com.sun.tools.javac.main.JavaCompiler.parseFiles(JavaCompiler.java:801) at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727) at com.sun.tools.javac.main.Main.compile(Main.java:353) at com.sun.tools.javac.main.Main.compile(Main.java:279) at com.sun.tools.javac.main.Main.compile(Main.java:270) at com.sun.tools.javac.Main.compile(Main.java:87) 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.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:420) at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:141) at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:493) at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:102) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:483) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:678) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:540) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkProjectLifecycle(DefaultLifecycleExecutor.java:1168) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.forkLifecycle(DefaultLifecycleExecutor.java:1009) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:627) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:553) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:523) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:371) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:332) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:181) [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3 minutes 29 seconds [INFO] Finished at: Wed Dec 02 14:33:16 EET 2009 [INFO] Final Memory: 64M/279M [INFO] ------------------------------------------------------------------------
    via by Leonid Maslov,
  • integrating with wicket
    via by fachhoch,
  • integrating with wicket
    via by fachhoch,
    • java.lang.OutOfMemoryError: PermGen space at com.sun.tools.javac.comp.Check.<init>(Check.java:836) at com.sun.tools.javac.comp.Check.instance(Check.java:86) at com.sun.tools.javac.code.Types.<init>(Types.java:101) at com.sun.tools.javac.code.Types.instance(Types.java:88) at com.sun.tools.javac.jvm.ClassReader.<init>(ClassReader.java:264) at com.sun.tools.javac.jvm.ClassReader.instance(ClassReader.java:226) at com.sun.tools.javac.main.JavaCompiler.<init>(JavaCompiler.java:331) at com.sun.tools.javac.main.JavaCompiler.instance(JavaCompiler.java:88) at com.sun.tools.javac.main.Main.compile(Main.java:424) at com.sun.tools.javac.main.Main.compile(Main.java:353) at com.sun.tools.javac.main.Main.compile(Main.java:342) at com.sun.tools.javac.main.Main.compile(Main.java:333) at com.sun.tools.javac.Main.compile(Main.java:94) 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.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554) at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161) at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605) at org.apache.maven.plugin.TestCompilerMojo.execute(TestCompilerMojo.java:161) at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101) at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209) 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:84) at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59) at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183) at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156) at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,