java.lang.OutOfMemoryError: Java heap space

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
via oracle.com by Unknown author

An easy way to solve OutOfMemoryError in java is to increase the maximum heap size by using JVM options -Xmx512M, this will immediately solve your OutOfMemoryError.

,
via Stack Overflow by Eugene Yokota

In Eclipse : go to Run --> Run Configurations --> then select the project under maven build --> then select the tab "JRE" --> then enter -Xmx1024m

This should increase the memory heap for all the builds/projects. The above memory size is 1 GB

java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.util.ArrayList.toArray(Unknown Source)
at com.google.common.collect.ImmutableList.copyFromCollection(ImmutableList.java:291)
at org.sonar.sslr.internal.matchers.ParseNode.(ParseNode.java:39)
at org.sonar.sslr.internal.vm.Machine.createNode(Machine.java:257)
at org.sonar.sslr.internal.vm.Instruction$RetInstruction.execute(Instruction.java:305)
at org.sonar.sslr.internal.vm.Machine.execute(Machine.java:163)
at org.sonar.sslr.internal.vm.Machine.execute(Machine.java:106)
at org.sonar.sslr.internal.vm.Machine.parse(Machine.java:84)
at com.sonar.sslr.api.typed.ActionParser.parse(ActionParser.java:102)
at com.sonar.sslr.api.typed.ActionParser.parse(ActionParser.java:91)
at org.sonar.plugins.javascript.JavaScriptSquidSensor.analyse(JavaScriptSquidSensor.java:185)
at org.sonar.plugins.javascript.JavaScriptSquidSensor.analyseFiles(JavaScriptSquidSensor.java:162)
at org.sonar.plugins.javascript.JavaScriptSquidSensor.analyse(JavaScriptSquidSensor.java:153)
at org.sonar.batch.phases.SensorsExecutor.executeSensor(SensorsExecutor.java:58)
at org.sonar.batch.phases.SensorsExecutor.execute(SensorsExecutor.java:50)
at org.sonar.batch.phases.AbstractPhaseExecutor.execute(AbstractPhaseExecutor.java:83)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.scan.ProjectScanContainer.scan(ProjectScanContainer.java:265)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:260)
at org.sonar.batch.scan.ProjectScanContainer.scanRecursively(ProjectScanContainer.java:258)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)
at org.sonar.core.platform.ComponentContainer.execute(ComponentContainer.java:127)
at org.sonar.batch.task.ScanTask.execute(ScanTask.java:55)
at org.sonar.batch.task.TaskContainer.doAfterStart(TaskContainer.java:86)
at org.sonar.core.platform.ComponentContainer.startComponents(ComponentContainer.java:142)

Users with the same issue

Once, 7 hours ago
Samebug visitor profile picture
Unknown user
Once, 1 day ago
Once, 2 weeks ago
Once, 3 weeks ago
2 times, 1 month ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.