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 Stack Overflow by Bdy
, 4 months ago
via Google Groups by Janar, 2 years ago
via Google Groups by ctesniere via StackOverflow, 1 month ago
via Stack Overflow by Steffi S.
, 1 year ago
java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:3236)
at java.io.ByteArrayOutputStream.grow(ByteArrayOutputStream.java:118)
at java.io.ByteArrayOutputStream.ensureCapacity(ByteArrayOutputStream.java:93)
at java.io.ByteArrayOutputStream.write(ByteArrayOutputStream.java:153)
at editor.resource$read_zip_entry.invokeStatic(resource.clj:136)
at editor.resource$load_zip.invokeStatic(resource.clj:150)
at editor.resource$make_zip_tree.invokeStatic(resource.clj:159)
at editor.resource_watch$make_library_zip_tree.invokeStatic(resource_watch.clj:27)
at editor.resource_watch$make_library_snapshot.invokeStatic(resource_watch.clj:38)
at editor.resource_watch$make_library_snapshot.invoke(resource_watch.clj:35)
at clojure.core$partial$fn__4759.invoke(core.clj:2515)
at clojure.core$map$fn__4785.invoke(core.clj:2646)
at clojure.lang.LazySeq.sval(LazySeq.java:40)
at clojure.lang.LazySeq.seq(LazySeq.java:49)
at clojure.lang.Cons.next(Cons.java:39)
at clojure.lang.RT.next(RT.java:688)
at clojure.core$next__4341.invokeStatic(core.clj:64)
at clojure.core.protocols$fn__6755.invokeStatic(protocols.clj:168)
at clojure.core.protocols$fn__6755.invoke(protocols.clj:124)
at clojure.core.protocols$fn__6710$G__6705__6719.invoke(protocols.clj:19)
at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:31)
at clojure.core.protocols$fn__6736.invokeStatic(protocols.clj:75)
at clojure.core.protocols$fn__6736.invoke(protocols.clj:75)
at clojure.core.protocols$fn__6684$G__6679__6697.invoke(protocols.clj:13)
at editor.resource_watch$combine_snapshots.invokeStatic(resource_watch.clj:84)
at editor.resource_watch$make_snapshot.invokeStatic(resource_watch.clj:95)
at editor.workspace$resource_sync_BANG_.invokeStatic(workspace.clj:211)
at editor.defold_project$open_project_BANG_.invokeStatic(defold_project.clj:745)
at editor.boot_open_project$open_project.invokeStatic(boot_open_project.clj:240)
at editor.boot_open_project$open_project.invoke(boot_open_project.clj:238)

Users with the same issue

32 times, 2 weeks ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
55 more bugmates

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