我在IntelliJ Idea的Java项目中运行插件SonarLint。
当我请求整个项目的代码分析时,我收到以下消息:
SonarLint分析失败:Java堆空间
以下是日志:
Error running SonarLint analysis
java.lang.OutOfMemoryError: Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3181)
at java.util.Vector.grow(Vector.java:266)
at java.util.Vector.ensureCapacityHelper(Vector.java:246)
at java.util.Vector.addElement(Vector.java:620)
at com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.addNode(DOM2DTM.java:247)
at com.sun.org.apache.xml.internal.dtm.ref.dom2dtm.DOM2DTM.nextNode(DOM2DTM.java:543)
at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase._nextsib(DTMDefaultBase.java:567)
at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBase.getNextSibling(DTMDefaultBase.java:1142)
at com.sun.org.apache.xml.internal.dtm.ref.DTMDefaultBaseTraversers$ChildTraverser.next(DTMDefaultBaseTraversers.java:465)
at com.sun.org.apache.xpath.internal.axes.AxesWalker.getNextNode(AxesWalker.java:337)
at com.sun.org.apache.xpath.internal.axes.AxesWalker.nextNode(AxesWalker.java:365)
at com.sun.org.apache.xpath.internal.axes.WalkingIterator.nextNode(WalkingIterator.java:197)
at com.sun.org.apache.xpath.internal.axes.NodeSequence.nextNode(NodeSequence.java:344)
at com.sun.org.apache.xpath.internal.axes.NodeSequence.runTo(NodeSequence.java:503)
at com.sun.org.apache.xml.internal.dtm.ref.DTMNodeList.<init>(DTMNodeList.java:83)
at com.sun.org.apache.xpath.internal.objects.XNodeSet.nodelist(XNodeSet.java:348)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.getResultAsType(XPathExpressionImpl.java:364)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.eval(XPathExpressionImpl.java:110)
at com.sun.org.apache.xpath.internal.jaxp.XPathExpressionImpl.evaluate(XPathExpressionImpl.java:191)
at org.sonar.java.xml.XmlCheckContextImpl.evaluate(XmlCheckContextImpl.java:82)
at org.sonar.java.xml.XmlCheckContextImpl.evaluateOnDocument(XmlCheckContextImpl.java:76)
at org.sonar.java.checks.xml.spring.SingleConnectionFactoryCheck.scanFileWithXPathExpressions(SingleConnectionFactoryCheck.java:45)
at org.sonar.java.xml.XPathXmlCheck.scanFile(XPathXmlCheck.java:36)
at org.sonar.java.xml.XmlAnalyzer.simpleScanAsXmlFile(XmlAnalyzer.java:107)
at org.sonar.java.xml.XmlAnalyzer.simpleScan(XmlAnalyzer.java:97)
at org.sonar.java.xml.XmlAnalyzer.scan(XmlAnalyzer.java:81)
at org.sonar.plugins.java.XmlFileSensor.execute(XmlFileSensor.java:55)
at org.sonarsource.sonarlint.core.analyzer.sensor.NewSensorsExecutor.executeSensor(NewSensorsExecutor.java:72)
at org.sonarsource.sonarlint.core.analyzer.sensor.NewSensorsExecutor.execute(NewSensorsExecutor.java:63)
at org.sonarsource.sonarlint.core.analyzer.sensor.PhaseExecutor.execute(PhaseExecutor.java:36)
at org.sonarsource.sonarlint.core.container.analysis.AnalysisContainer.doAfterStart(AnalysisContainer.java:142)
at org.sonarsource.sonarlint.core.container.ComponentContainer.startComponents(ComponentContainer.java:125)
如何增加内存?
答案 0 :(得分:2)