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.

Solutions on the web

via Oracle Community by 800289, 1 year ago
Java heap space
via Google Groups by Nilanga Saluwadana, 2 years ago
Java heap space
via Google Groups by Nilanga Saluwadana, 2 years ago
Java heap space
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Unknown Source)
at java.lang.AbstractStringBuilder.expandCapacity(Unknown Source)
at java.lang.AbstractStringBuilder.append(Unknown Source)
at java.lang.StringBuilder.append(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readUTFSpan(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readUTFBody(Unknown Source)
at java.io.ObjectInputStream$BlockDataInputStream.readUTF(Unknown Source)
at java.io.ObjectInputStream.readString(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readArray(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readArray(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.defaultReadFields(Unknown Source)
at java.io.ObjectInputStream.readSerialData(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at oracle.disco.remote.rmi.serverbase.RMISessionBase_Stub.getData(Unknown Source)
at oracle.disco.model.corbaserver.ModelInterface.getData(Unknown Source)
at oracle.disco.model.corbaserver.ModelInterface.GetData(Unknown Source)
at oracle.disco.model.corbaserver.serverrequest.DsrRetrieveDataBlock._retrieveDataBlock(Unknown Source)
at oracle.disco.model.corbaserver.serverrequest.DsrRetrieveDataBlock.xmlUpdateServer(Unknown Source)
at oracle.disco.model.corbaserver.serverrequest.DsrCorbaXML.corbaUpdateServer(Unknown Source)
at oracle.disco.model.corbaserver.serverrequest.DsrGeneralCorbaXML.updateServer(Unknown Source)
at oracle.disco.model.corbaserver.execengine.ExecuteEngineImpl._nonReentrantExecute(Unknown Source)
at oracle.disco.model.corbaserver.execengine.ExecuteEngineImpl.execute(Unknown Source)
at oracle.disco.model.corbaserver.execengine.SessionControllerImpl.execute(Unknown Source)

Users with the same issue

2 times, 6 days ago
3 times, 1 month ago
Once, 2 months ago
Once, 2 months ago
2 times, 3 months ago

Write tip

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