java.lang.OutOfMemoryError: Java heap space

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

java.lang.OutOfMemoryError: Java heap space

fayaz ahamed
Hi All,

i tried to analyse a java project(bigger one) which has three src directories on sonar 2.13 using sonar-runner.
i am getting the following error:

java.lang.OutOfMemoryError: Java heap space


I increased the memory, SONAR_RUNNER_OPTS="-Xmx512m -XX:MaxPermSize=512m"
Again the same error.
How to get rid of this error?..Help me..


Thanks and Regards,
Fayaz ahamed.
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space

00se
Hello Fayaz,

Very recently I had the same problems, what worked for me was this:

Assuming you are running a Tomcat 6 instance;
http://www.zulutown.com/blog/2009/03/12/solving-tomcat-outofmemoryerror-heap-space-and-permgen-space/

I set the PermSpace to 512m..
tomcat6 //US//Tomcat6 --JvmMx 1024 ++JvmOptions="-XX:MaxPermSize=512m

Let me know if this worked for you.


Best regards,


Ed

Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space

Freddy Mallet
In reply to this post by fayaz ahamed
Hi Fayaz,

Could you send the Sonar error log to check that the property SONAR_RUNNER_OPTS is correctly taken into account ?

Thanks
Freddy
-----
Sonar for Continuous Inspection



On Thu, Apr 19, 2012 at 3:21 PM, fayaz ahamed <[hidden email]> wrote:
Hi All,

i tried to analyse a java project(bigger one) which has three src
directories on sonar 2.13 using sonar-runner.
i am getting the following error:

*java.lang.OutOfMemoryError: Java heap space*


I increased the memory, *SONAR_RUNNER_OPTS="-Xmx512m -XX:MaxPermSize=512m"*
Again the same error.
How to get rid of this error?..Help me..


Thanks and Regards,
Fayaz ahamed.


--
View this message in context: http://sonar.15.n6.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4898141p4898141.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space

fayaz ahamed
Hi Freddy,

Here is the log file:


:
:
:
:
11:07:40.375 WARN  Class 'ota/rqrs/air/extensions/types/flightsegment/TPAExtensi
on$FlightLeg$CabinInfo' is not accessible through the ClassLoader.
11:07:40.375 WARN  Class 'rqrs/common/TravelerCheckingIn$CheckInPoint$CheckedIte
m' is not accessible through the ClassLoader.
11:07:40.375 WARN  Class 'ota_aircommontypes/SpecialServiceRequestType' is not a
ccessible through the ClassLoader.

11:07:40.390 WARN  Class 'ota/rqrs/air/extensions/types/flightsegment/MealServic
eType' is not accessible through the ClassLoader.
11:07:40.390 WARN  Class 'aero/sita/Link/emulator/gabriel/RestrictedGabrielEmula
torBean$SendThread' is not accessible through the ClassLoader.
11:07:40.390 WARN  Class 'ota_aircommontypes/FormattedTextTextType' is not acces
sible through the ClassLoader.
11:07:40.390 INFO  Java byte
code scan done: 160672 ms
11:07:41.515 INFO  Java Squid scan...
11:07:41.625 INFO  Java Squid scan done: 110 ms
11:07:41.625 INFO  Squid extraction...
11:07:42.718 INFO  Package design analysis...
11:08:08.796 INFO  Package design analysis done: 26078 ms
11:08:41.171 INFO  Squid extraction done: 59546 ms
11:08:41.187 INFO  Sensor SquidSensor done: 372469 ms
11:08:41.187 INFO  Sensor FindbugsSensor...
11:08:41.187 INFO  Execute Findbugs 1.3.9...
11:08:41.218 INFO  Found findbugs plugin: file:/D:/DOCUME~1/m1011484/LOCALS~1/Te
mp/sonar-batch47859923688917540129088081921550/plugins/findbugs/META-INF/lib/fin
dbugs-1.3.9.jar
11:08:45.687 INFO  Loaded plugin edu.umd.cs.findbugs.plugins.core
11:08:45.781 INFO  Findbugs output report: D:\SRDT-Workbench\13-09-2010\TCS_2\Ja
va\.sonar\findbugs-result.xml
Out of memory
Total memory: 518M
 free memory: 0M

Analyzed: D:\SRDT-Workbench\13-09-2010\TCS_2\bin
     Aux: D:\DOCUME~1\m1011484\LOCALS~1\Temp\findbugs3460168555516252649.jar
     Aux: D:\DOCUME~1\m1011484\LOCALS~1\Temp\findbugs4162468257457223479.jar
Total time: 17:07.282s
Final Memory: 150M/494M

Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException: org.
sonar.api.utils.SonarException: Can not execute Findbugs
        at org.sonar.runner.Runner.delegateExecution(Runner.java:189)
        at org.sonar.runner.Runner.execute(Runner.java:78)
        at org.sonar.runner.Main.main(Main.java:61)
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:6
4)
        at org.sonar.batch.phases.Phases.execute(Phases.java:93)
        at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:14
3)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111)
        at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:102)
        at org.sonar.batch.bootstrap.Module.start(Module.java:83)
        at org.sonar.batch.Batch.execute(Batch.java:100)
        at org.sonar.runner.Launcher.executeBatch(Launcher.java:65)
        at org.sonar.runner.Launcher.execute(Launcher.java:58)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.sonar.runner.Runner.delegateExecution(Runner.java:186)
        ... 2 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)
        ... 20 more
Caused by: java.lang.OutOfMemoryError: Java heap space
        at java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:60)
        at edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine.analyze(
ClassDataAnalysisEngine.java:69)
        at edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine.analyze(
ClassDataAnalysisEngine.java:42)
        at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(Ana
lysisCache.java:214)
        at edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngine.ana
lyze(JavaClassAnalysisEngine.java:54)
        at edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngine.ana
lyze(JavaClassAnalysisEngine.java:43)
        at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(Ana
lysisCache.java:214)
        at edu.umd.cs.findbugs.classfile.engine.bcel.ClassContextClassAnalysisEn
gine.analyze(ClassContextClassAnalysisEngine.java:46)
        at edu.umd.cs.findbugs.classfile.engine.bcel.ClassContextClassAnalysisEn
gine.analyze(ClassContextClassAnalysisEngine.java:38)
        at edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(Ana
lysisCache.java:214)
        at edu.umd.cs.findbugs.ba.AnalysisContext.isTooBig(AnalysisContext.java:
387)
        at edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:957)
        at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:230)
        at org.sonar.plugins.findbugs.FindbugsExecutor$FindbugsTask.call(Findbug
sExecutor.java:138)
        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(ThreadPoolExec
utor.java:886)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
        at java.lang.Thread.run(Thread.java:619)


Thanks and Regards,
Fayaz Ahamed.



Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space

Evgeny Mandrikov
Hi,

This is a well-known fact that Findbugs is memory hungry and may require a lot of memory depending of size of a project, so it might make sence to use even more than 512M. How big is your project? And also it might make sence to disable findbugs rules and give a try without it.

On Fri, Apr 20, 2012 at 13:06, fayaz ahamed <[hidden email]> wrote:
Hi Freddy,

Here is the log file:


:
:
:
:
11:07:40.375 WARN  Class
'ota/rqrs/air/extensions/types/flightsegment/TPAExtensi
on$FlightLeg$CabinInfo' *is not accessible through the ClassLoader.*
11:07:40.375 WARN  Class
'rqrs/common/TravelerCheckingIn$CheckInPoint$CheckedIte
m' *is not accessible through the ClassLoader.*
11:07:40.375 WARN  Class 'ota_aircommontypes/SpecialServiceRequestType'* is
not a
ccessible through the ClassLoader.*
11:07:40.390 WARN  Class
'ota/rqrs/air/extensions/types/flightsegment/MealServic
eType' *is not accessible through the ClassLoader.*
11:07:40.390 WARN  Class
'aero/sita/Link/emulator/gabriel/RestrictedGabrielEmula
torBean$SendThread'* is not accessible through the ClassLoader*.
11:07:40.390 WARN  Class 'ota_aircommontypes/FormattedTextTextType' *is not
acces
sible through the ClassLoader.
11:07:40.390 INFO  Java byte*code scan done: 160672 ms
11:07:41.515 INFO  Java Squid scan...
11:07:41.625 INFO  Java Squid scan done: 110 ms
11:07:41.625 INFO  Squid extraction...
11:07:42.718 INFO  Package design analysis...
11:08:08.796 INFO  Package design analysis done: 26078 ms
11:08:41.171 INFO  Squid extraction done: 59546 ms
11:08:41.187 INFO  Sensor SquidSensor done: 372469 ms
11:08:41.187 INFO  Sensor FindbugsSensor...
11:08:41.187 INFO  Execute Findbugs 1.3.9...
11:08:41.218 INFO  Found findbugs plugin:
file:/D:/DOCUME~1/m1011484/LOCALS~1/Te
mp/sonar-batch47859923688917540129088081921550/plugins/findbugs/META-INF/lib/fin
dbugs-1.3.9.jar
11:08:45.687 INFO  Loaded plugin edu.umd.cs.findbugs.plugins.core
*11:08:45.781 INFO  Findbugs output report:
D:\SRDT-Workbench\13-09-2010\TCS_2\Ja
va\.sonar\findbugs-result.xml
Out of memory
Total memory: 518M
 free memory: 0M*
Analyzed: D:\SRDT-Workbench\13-09-2010\TCS_2\bin
    Aux: D:\DOCUME~1\m1011484\LOCALS~1\Temp\findbugs3460168555516252649.jar
    Aux: D:\DOCUME~1\m1011484\LOCALS~1\Temp\findbugs4162468257457223479.jar
*Total time: 17:07.282s
Final Memory: 150M/494M*
Exception in thread "main" org.sonar.batch.bootstrapper.BootstrapException:
org.
sonar.api.utils.SonarException: Can not execute Findbugs
       at org.sonar.runner.Runner.delegateExecution(Runner.java:189)
       at org.sonar.runner.Runner.execute(Runner.java:78)
       at org.sonar.runner.Main.main(Main.java:61)
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:6
4)
       at org.sonar.batch.phases.Phases.execute(Phases.java:93)
       at
org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:14
3)
       at org.sonar.batch.bootstrap.Module.start(Module.java:83)
       at
org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:111)
       at
org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:101)
       at org.sonar.batch.bootstrap.Module.start(Module.java:83)
       at
org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.jav
a:102)
       at org.sonar.batch.bootstrap.Module.start(Module.java:83)
       at org.sonar.batch.Batch.execute(Batch.java:100)
       at org.sonar.runner.Launcher.executeBatch(Launcher.java:65)
       at org.sonar.runner.Launcher.execute(Launcher.java:58)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
java:39)
       at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
sorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.sonar.runner.Runner.delegateExecution(Runner.java:186)
       ... 2 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)
       ... 20 more
*Caused by: java.lang.OutOfMemoryError: Java heap space*
       at
java.io.ByteArrayOutputStream.<init>(ByteArrayOutputStream.java:60)
       at
edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine.analyze(
ClassDataAnalysisEngine.java:69)
       at
edu.umd.cs.findbugs.classfile.engine.ClassDataAnalysisEngine.analyze(
ClassDataAnalysisEngine.java:42)
       at
edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(Ana
lysisCache.java:214)
       at
edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngine.ana
lyze(JavaClassAnalysisEngine.java:54)
       at
edu.umd.cs.findbugs.classfile.engine.bcel.JavaClassAnalysisEngine.ana
lyze(JavaClassAnalysisEngine.java:43)
       at
edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(Ana
lysisCache.java:214)
       at
edu.umd.cs.findbugs.classfile.engine.bcel.ClassContextClassAnalysisEn
gine.analyze(ClassContextClassAnalysisEngine.java:46)
       at
edu.umd.cs.findbugs.classfile.engine.bcel.ClassContextClassAnalysisEn
gine.analyze(ClassContextClassAnalysisEngine.java:38)
       at
edu.umd.cs.findbugs.classfile.impl.AnalysisCache.getClassAnalysis(Ana
lysisCache.java:214)
       at
edu.umd.cs.findbugs.ba.AnalysisContext.isTooBig(AnalysisContext.java:
387)
       at
edu.umd.cs.findbugs.FindBugs2.analyzeApplication(FindBugs2.java:957)
       at edu.umd.cs.findbugs.FindBugs2.execute(FindBugs2.java:230)
       at
org.sonar.plugins.findbugs.FindbugsExecutor$FindbugsTask.call(Findbug
sExecutor.java:138)
       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(ThreadPoolExec
utor.java:886)
       at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor
.java:908)
       at java.lang.Thread.run(Thread.java:619)


Thanks and Regards,
Fayaz Ahamed.





--
View this message in context: http://sonar.15.n6.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4898141p4901097.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space

fayaz ahamed
Hi Fabrice,

The project's folder is about 500MB.So how much memory it may need approx
?..any idea?..


Thanks and Regards,
Fayaz ahamed.

--
View this message in context: http://sonar.15.n6.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4898141p4901417.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space

fayaz ahamed
In reply to this post by Evgeny Mandrikov
Hi Evgeny,
The project's folder is of about 500MB ?..How much memory it may require?..any idea?..


Thanks and Regards,
Fayaz ahamed.
Reply | Threaded
Open this post in threaded view
|

Re: java.lang.OutOfMemoryError: Java heap space

Evgeny Mandrikov
No idea. As I suggested : you can try to disable findbugs just to be sure that without it everything will work with low memory, and then try-fail-try approach to determine memory for findbugs.

On Fri, Apr 20, 2012 at 15:45, fayaz ahamed <[hidden email]> wrote:
Hi Evgeny,
The project's folder is of about 500MB ?..How much memory it may
require?..any idea?..


Thanks and Regards,
Fayaz ahamed.


--
View this message in context: http://sonar.15.n6.nabble.com/java-lang-OutOfMemoryError-Java-heap-space-tp4898141p4901437.html
Sent from the Sonar user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email





--
Best regards,
Evgeny Mandrikov aka Godin <http://godin.net.ru>
http://twitter.com/_godin_