java.lang.OutOfMemoryError: Java heap space

Jenkins JIRA | frohman | 8 years ago
  1. 0

    I have a project that does not have a very large number of CheckStyle issues (less than 6500). Building it using Maven on the command line does not have any issues. However, when I build it using the Maven runner in Hudson, I get an OutOfMemoryError. I have tried using -Xmx768M and -XX:MaxPermSize=256M when I start tomcat, but they have not seemed to fix the problem. The stack trace does not seem to be the same between runs. [INFO] Generating "Checkstyle" report. [WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent! [INFO] There are 295 checkstyle errors. <snip/> [INFO] Generating "Project Team" report. [PMD] Successfully parsed file /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/target/pmd.xml of module enDx Web App with 235 warnings. [PMD] A total of 235 annotations have been found. [CHECKSTYLE] Successfully parsed file /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/target/checkstyle-result.xml of module enDx Web App with 6293 warnings. [HUDSON] Archiving /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/pom.xml to <snip/> [HUDSON] Archiving /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/target/endx-webapp.war to <snip/> [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Java heap space [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.OutOfMemoryError: Java heap space at java.util.HashSet.<init>(HashSet.java:86) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addType(AnnotationContainer.java:205) at hudson.plugins.checkstyle.util.model.AnnotationContainer.updateMappings(AnnotationContainer.java:167) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotation(AnnotationContainer.java:262) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addFile(AnnotationContainer.java:252) at hudson.plugins.checkstyle.util.model.AnnotationContainer.updateMappings(AnnotationContainer.java:176) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotation(AnnotationContainer.java:262) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addModule(AnnotationContainer.java:222) at hudson.plugins.checkstyle.util.model.AnnotationContainer.updateMappings(AnnotationContainer.java:170) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotation(AnnotationContainer.java:262) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotations(AnnotationContainer.java:272) at hudson.plugins.checkstyle.util.model.JavaProject.addModule(JavaProject.java:46) at hudson.plugins.checkstyle.util.FilesParser.invoke(FilesParser.java:94) at hudson.plugins.checkstyle.util.FilesParser.invoke(FilesParser.java:22) at hudson.FilePath.act(FilePath.java:315) at hudson.plugins.checkstyle.CheckStyleReporter.perform(CheckStyleReporter.java:65) at hudson.plugins.checkstyle.util.HealthAwareMavenReporter.postExecute(HealthAwareMavenReporter.java:125) at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:585) at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:250) at hudson.maven.agent.PluginManagerInterceptor$1MojoConfig.callPost(PluginManagerInterceptor.java:104) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:137) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Jenkins JIRA | 8 years ago | frohman
    java.lang.OutOfMemoryError: Java heap space
  2. 0

    I have a project that does not have a very large number of CheckStyle issues (less than 6500). Building it using Maven on the command line does not have any issues. However, when I build it using the Maven runner in Hudson, I get an OutOfMemoryError. I have tried using -Xmx768M and -XX:MaxPermSize=256M when I start tomcat, but they have not seemed to fix the problem. The stack trace does not seem to be the same between runs. [INFO] Generating "Checkstyle" report. [WARNING] File encoding has not been set, using platform encoding ANSI_X3.4-1968, i.e. build is platform dependent! [INFO] There are 295 checkstyle errors. <snip/> [INFO] Generating "Project Team" report. [PMD] Successfully parsed file /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/target/pmd.xml of module enDx Web App with 235 warnings. [PMD] A total of 235 annotations have been found. [CHECKSTYLE] Successfully parsed file /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/target/checkstyle-result.xml of module enDx Web App with 6293 warnings. [HUDSON] Archiving /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/pom.xml to <snip/> [HUDSON] Archiving /var/lib/hudson/jobs/endx_nightly/workspace/src/endx-webapp/target/endx-webapp.war to <snip/> [INFO] ------------------------------------------------------------------------ [ERROR] FATAL ERROR [INFO] ------------------------------------------------------------------------ [INFO] Java heap space [INFO] ------------------------------------------------------------------------ [INFO] Trace java.lang.OutOfMemoryError: Java heap space at java.util.HashSet.<init>(HashSet.java:86) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addType(AnnotationContainer.java:205) at hudson.plugins.checkstyle.util.model.AnnotationContainer.updateMappings(AnnotationContainer.java:167) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotation(AnnotationContainer.java:262) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addFile(AnnotationContainer.java:252) at hudson.plugins.checkstyle.util.model.AnnotationContainer.updateMappings(AnnotationContainer.java:176) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotation(AnnotationContainer.java:262) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addModule(AnnotationContainer.java:222) at hudson.plugins.checkstyle.util.model.AnnotationContainer.updateMappings(AnnotationContainer.java:170) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotation(AnnotationContainer.java:262) at hudson.plugins.checkstyle.util.model.AnnotationContainer.addAnnotations(AnnotationContainer.java:272) at hudson.plugins.checkstyle.util.model.JavaProject.addModule(JavaProject.java:46) at hudson.plugins.checkstyle.util.FilesParser.invoke(FilesParser.java:94) at hudson.plugins.checkstyle.util.FilesParser.invoke(FilesParser.java:22) at hudson.FilePath.act(FilePath.java:315) at hudson.plugins.checkstyle.CheckStyleReporter.perform(CheckStyleReporter.java:65) at hudson.plugins.checkstyle.util.HealthAwareMavenReporter.postExecute(HealthAwareMavenReporter.java:125) at hudson.maven.MavenModuleSetBuild$Builder.postExecute(MavenModuleSetBuild.java:585) at hudson.maven.MavenBuilder$Adapter.postExecute(MavenBuilder.java:250) at hudson.maven.agent.PluginManagerInterceptor$1MojoConfig.callPost(PluginManagerInterceptor.java:104) at hudson.maven.agent.PluginManagerInterceptor.executeMojo(PluginManagerInterceptor.java:137) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.lifecycle.LifecycleExecutorInterceptor.execute(LifecycleExecutorInterceptor.java:42) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

    Jenkins JIRA | 8 years ago | frohman
    java.lang.OutOfMemoryError: Java heap space
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    Issue with SonarQube Java Analyzer in Eclipse

    Stack Overflow | 2 years ago | user127377
    java.lang.OutOfMemoryError: Java heap space

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.OutOfMemoryError

      Java heap space

      at java.util.HashSet.<init>()
    2. Java RT
      HashSet.<init>
      1. java.util.HashSet.<init>(HashSet.java:86)
      1 frame