Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9013705
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T03:20:09+00:00 2026-06-16T03:20:09+00:00

i am trying to do the code analysis in sonar 2.11, using maven 3.

  • 0

i am trying to do the code analysis in sonar 2.11, using maven 3.

I am facing this error

java.lang.OutOfMemoryError: Java heap space.

i tried to increase the MAVEN_OPTS to -Xmx1024m -Xms512m -XX:MaxPermSize=256m but no use.

The project is of large size of about 900MB. I am using the command mvn sonar:sonar -X in maven 3. But the build is failure.
I am not running the tests or nor using any surefire plugin in my superPOM. So i am unable to find the cause of the problem.
Please help me to figure out where the problem exixts.
Thanks in advance…
Here is the log…

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO] 
[INFO] PHOENIX JAVA MODULE COMPONENT ..................... SKIPPED
[INFO] PHOENIX JAVA COMPONENT ............................ FAILURE [1:27:23.969s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1:27:26.229s
[INFO] Finished at: Fri Dec 14 14:14:24 IST 2012
[INFO] Final Memory: 287M/1016M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXX: Can not execute Sonar: Can not execute Findbugs: java.lang.OutOfMemoryError: Java heap space -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.codehaus.mojo:sonar-maven-plugin:2.0:sonar (default-cli) on project XXX: Can not execute Sonar   
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:217)
    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)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
    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.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
Caused by: org.apache.maven.plugin.MojoExecutionException: Can not execute Sonar
    at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:118)
    at org.codehaus.mojo.sonar.Bootstraper.start(Bootstraper.java:65)
    at org.codehaus.mojo.sonar.SonarMojo.execute(SonarMojo.java:90)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
    ... 19 more
Caused by: org.sonar.api.utils.SonarException: Can not execute Findbugs
    at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:120)
    at org.sonar.plugins.findbugs.FindbugsSensor.analyse(FindbugsSensor.java:58)
    at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:64)
    at org.sonar.batch.phases.Phases.execute(Phases.java:93)
    at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:143)
    at org.sonar.batch.bootstrap.Module.start(Module.java:89)
    at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:110)
    at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:105)
    at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:100)
    at org.sonar.batch.bootstrap.Module.start(Module.java:89)
    at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:96)
    at org.sonar.batch.bootstrap.Module.start(Module.java:89)
    at org.sonar.batch.Batch.execute(Batch.java:74)
    at org.sonar.maven3.SonarMojo.executeBatch(SonarMojo.java:147)
    at org.sonar.maven3.SonarMojo.execute(SonarMojo.java:136)
    at org.codehaus.mojo.sonar.Bootstraper.executeMojo(Bootstraper.java:113)
    ... 23 more
Caused by: java.util.concurrent.ExecutionException: java.lang.OutOfMemoryError: Java heap space
    at java.util.concurrent.FutureTask$Sync.innerGet(FutureTask.java:232)
    at java.util.concurrent.FutureTask.get(FutureTask.java:91)
    at org.sonar.plugins.findbugs.FindbugsExecutor.execute(FindbugsExecutor.java:112)
    ... 38 more
Caused by: java.lang.OutOfMemoryError: Java heap space
    at java.util.ArrayList.<init>(ArrayList.java:112)
    at edu.umd.cs.findbugs.ba.Frame.<init>(Frame.java:110)
    at edu.umd.cs.findbugs.ba.vna.ValueNumberFrame.<init>(ValueNumberFrame.java:58)
    at edu.umd.cs.findbugs.ba.vna.ValueNumberAnalysis.createFact(ValueNumberAnalysis.java:148)
    at edu.umd.cs.findbugs.ba.vna.ValueNumberAnalysis.createFact(ValueNumberAnalysis.java:55)
    at edu.umd.cs.findbugs.ba.Dataflow.execute(Dataflow.java:309)
    at edu.umd.cs.findbugs.classfile.engine.bcel.ValueNumberDataflowFactory.analyze(ValueNumberDataflowFactory.java:72)
    at edu.umd.cs.findbugs.classfile.engine.bcel.ValueNumberDataflowFactory.analyze(ValueNumberDataflowFactory.java:47)
    at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.analyzeMethod(AnalysisCache.java:332)
    at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getMethodAnalysis(AnalysisCache.java:282)
    at edu.umd.cs.findbugs.ba.ClassContext.getMethodAnalysis(ClassContext.java:942)
    at edu.umd.cs.findbugs.ba.ClassContext.getValueNumberDataflow(ClassContext.java:361)
    at edu.umd.cs.findbugs.detect.FindInconsistentSync2.findObviouslyLockedCallSites(FindInconsistentSync2.java:963)
    at edu.umd.cs.findbugs.detect.FindInconsistentSync2.visitClassContext(FindInconsistentSync2.java:311)
    at edu.umd.cs.findbugs.DetectorToDetector2Adapter.visitClass(DetectorToDetector2Adapter.java:68)
    at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:979)
    at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:230)
    at org.sonar.plugins.findbugs.FindbugsExecutor$FindbugsTask.call(FindbugsExecutor.java:137)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
[ERROR] 
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR] 
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR]   mvn <goals> -rf :XXX
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T03:20:10+00:00Added an answer on June 16, 2026 at 3:20 am

    This is a well-known problem: Findbugs is really memory hungry, so I’m not surprised that with a 900MB project, you have to increase the JVM memory options quite a lot.

    3 things you can do:

    1. increase again the JVM memory options till it is OK

    2. reduce the amount of activated Findbugs rules in your Sonar quality profile

    3. refactor your project is smaller modules so that each module requires less memory to get analyzed by Findbugs

    If I were you, I’d really go for at least option #3, because 900MB for a single project is really huge.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to understand static analysis of Java bytecode/source-code. These terms frequently come
I am trying to use R2WinBUGS using this example: code (Please only consider the
I am trying to build a scanner for AWK source code using (F)Lex analysis.
I am trying to view the source code of Wireshark to understand protocol analysis,
I am having an issue converting type. I was trying code like this (minimal,
I am trying to code AES using Cipher Block Chaining(CBC) mode. I am pretty
I am trying to code the following query using Zend_Db api's: select * from
I'm trying to code this site (keyword trying) and I'm trying to figure out
I am trying to export biometric data from an analysis using the ROCR package.
I'm trying to write a custom FxCop code analysis rule that will warn developers

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.