2013-01-10 25 views
7

मैं सोनार में एक बड़ी परियोजना का विश्लेषण कर रहा हूँ और निम्न त्रुटि मिलती है:सोनार विश्लेषण स्मृति त्रुटि से बाहर देता है, क्या मुझे चींटी या सोनार सर्वर की जेवीएम ढेर स्पेस बढ़ाना चाहिए?

[sonar:sonar] 03:55:39.511 INFO p.PhasesTimeProfiler - Execute decorators... 

BUILD FAILED 
[...] 
[...] java.lang.OutOfMemoryError: Java heap space 
at org.sonar.batch.index.MeasurePersister.model(MeasurePersister.java:127) 
at org.sonar.batch.index.MeasurePersister.getMeasuresToSave(MeasurePersister.java:117) 
at org.sonar.batch.index.MeasurePersister.dump(MeasurePersister.java:70) 
at org.sonar.batch.index.DefaultPersistenceManager.dump(DefaultPersistenceManager.java:63) 
at org.sonar.batch.phases.Phases.execute(Phases.java:95) 
at org.sonar.batch.bootstrap.ProjectModule.doStart(ProjectModule.java:139) 
at org.sonar.batch.bootstrap.Module.start(Module.java:83) 
at org.sonar.batch.bootstrap.BatchModule.analyze(BatchModule.java:131) 
at org.sonar.batch.bootstrap.BatchModule.doStart(BatchModule.java:121) 
at org.sonar.batch.bootstrap.Module.start(Module.java:83) 
at org.sonar.batch.bootstrap.BootstrapModule.doStart(BootstrapModule.java:121) 
at org.sonar.batch.bootstrap.Module.start(Module.java:83) 
at org.sonar.batch.Batch.execute(Batch.java:104) 
at org.sonar.ant.Launcher.execute(Launcher.java:78) 
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:616) 
at org.sonar.ant.SonarTask.delegateExecution(SonarTask.java:244) 
at org.sonar.ant.SonarTask.execute(SonarTask.java:193) 
at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291) 
at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source) 
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) 
at java.lang.reflect.Method.invoke(Method.java:616) 
at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) 
at org.apache.tools.ant.Task.perform(Task.java:348) 
at org.apache.tools.ant.Target.execute(Target.java:392) 
at org.apache.tools.ant.Target.performTasks(Target.java:413) 
at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399) 
at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38) 
at org.apache.tools.ant.Project.executeTargets(Project.java:1251) 
at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442) 

मैं चल सोनार सर्वर जावा ढेर अंतरिक्ष, या चींटी लक्ष्य सोनार काम को क्रियान्वित करने में वृद्धि करना चाहिए?

+0

आप किस आईडीई का उपयोग कर रहे हैं? – ppeterka

+0

मैं चींटी लक्ष्य (सोनार) – user1340582

+0

निष्पादित करने के लिए जेनकींस का उपयोग कर रहा हूं ओह, ठीक है, यह संभावना है कि मैंने छोड़ा ... – ppeterka

उत्तर

13

आप स्टैक ट्रेस से देख सकते हैं, चींटी ताकि आप वीएम चींटी में चलाता है के लिए ढेर अंतरिक्ष वृद्धि करनी चाहिए, सोनार विश्लेषण शुरू होता है

यह एक बहुत ही इसी तरह के सवाल BTW है:। How to increase Sonar Java heap space

The Sonar ANT task executes as part of ANT so you need to set the JVM heap using the standard ANT environment parameter. For example:

export ANT_OPTS=-Xmx256m

0:

कमांड लाइन चींटी उपयोग के लिए

अन्य प्रश्न पर मार्क ओ'कॉनर द्वारा जवाब से उद्धरण

टिप्पणी:

  • इस, लिनक्स के लिए है विंडोज के लिए, set आदेश
  • इस सख्ती से ढेर अंतरिक्ष के लिए है का उपयोग करें। Permgen के लिए, का उपयोग -XX:MaxPermSize=<desired amount>

यह एक और भी अधिक समान सवाल यह है: Build Failed java.lang.OutOfMemoryError: Java heap space

ग्रहण आईडीई

कोट के लिए लेख http://soenkerohde.com/2008/06/change-eclipse-ant-settings-when-you-run-out-of-memory/

  • In Eclipse open menu: Run->External Tools->Open External Tools Dialog
  • Select the build script you want to change on the left
  • Select the JRE tab on the right
  • Set the following as VM arguments: -Xms768m -Xmx1024m -XX:MaxPermSize=512m

IntelliJ विचार के लिए से

इस मंच धागा उपयोगी है: ANT build java heap space

जवाब से उद्धरण:

Please make sure that you increased heap in a correct place. You need to click 'Properties' button in IDEA's Ant tool window and edit 'Maximum heap size (Mb)' field there.

इसके अलावा, IntelliJ विचार पेज से:

The memory heap of the build process is independent of IntelliJ IDEA memory heap, and is released after the build process is complete.

To increase a memory heap: Open the Build File Properties dialog box. In the Maximum heap size field, type the required amount of memory.

: लेख से Increasing Memory Heap

उद्धरण

जेनकिन्स कॉन के लिए tinuous एकता और चींटी का निर्माण

यह सवाल उपयोगी है: How to increase maven heapspace in hudson builds

  1. Navigate to your hudson job,
  2. click Configure,
  3. scroll down to the Build section, and
  4. click the Advanced button.
  5. Enter this into MAVEN_OPTS: -Xmx512m -XX:MaxPermSize=128m
:

Set the JAVA OPTIONS as -Xmx512m -XX:MaxPermSize=256m only without the ANT_OPTS=

Maven बनाता लिए, इस लेख उपयोग की है: How to use the Java Options in jenkins ant build tool to set ANT_OPTS

जवाब से उद्धरण

+0

मैक के लिए क्या है ..? – Mansur

संबंधित मुद्दे