Java heap space error

125 views
Skip to first unread message

john.l...@gmail.com

unread,
Nov 9, 2018, 12:00:22 PM11/9/18
to gsea-help
Hello,

I am running into an issue where GSEA runs out of memory while analyzing my data. I am able to start running GSEA, but after about a minute I get the following error:

# of exceptions: 1
------Java heap space------
java.lang.OutOfMemoryError: Java heap space
 at edu.mit.broad.genome.math.Vector.<init>(Vector.java:80)
 at edu.mit.broad.genome.math.Vector.<init>(Vector.java:214)
 at edu.mit.broad.genome.math.Vector.<init>(Vector.java:199)
 at edu.mit.broad.genome.alg.gsea.KSCore.calculateKSScore_all_modes(KSCore.java:262)
 at edu.mit.broad.genome.alg.gsea.KSCore.calculateKSScore(KSCore.java:30)
 at edu.mit.broad.genome.alg.gsea.KSTests.shuffleTemplate_canned_templates(KSTests.java:224)
 at edu.mit.broad.genome.alg.gsea.KSTests.shuffleTemplate(KSTests.java:152)
 at edu.mit.broad.genome.alg.gsea.KSTests.executeGsea(KSTests.java:102)
 at edu.mit.broad.genome.alg.gsea.KSTests.executeGsea(KSTests.java:76)
 at xtools.gsea.AbstractGsea2Tool.execute_one(AbstractGsea2Tool.java:121)
 at xtools.gsea.AbstractGsea2Tool.execute_one_with_reporting(AbstractGsea2Tool.java:159)
 at xtools.gsea.Gsea.execute(Gsea.java:116)
 at edu.mit.broad.xbench.tui.TaskManager$ToolRunnable.run(TaskManager.java:436)
 at java.lang.Thread.run(Unknown Source)

I am running Windows 10 (with 8GB of RAM) and have 64-bit Java 8. I encountered this error while operating the GSEA version 3.0, launching with 1GB. I tried launching the versions with 2, 4, and 8GB of memory, but they would not launch from my browser. I've tried uninstalling and reinstalling Java, but that doesn't seem to help.

Our IT department suggested that it might be a memory leak or an issue with the browser settings. Do you have any suggestions for how to resolve this issue?

Thank you,

John Ligon

David Eby

unread,
Nov 9, 2018, 12:58:23 PM11/9/18
to gsea-help
Hi John,

Your error report of Java not launching in the 2+ GB configurations is consistent with having 32-bit Java.  Even though you mention having 64-bit Java, note that it's possible to have multiple installations of Java on the same computer.  In particular, the version Windows usually wants to install for use with a web browser is often 32-bit.

Our best info on the subject is on this page in our Help Wiki.  It's a little dated but mostly still applicable.

Regards,
David

John Ligon

unread,
Nov 9, 2018, 1:12:27 PM11/9/18
to gsea...@googlegroups.com
Hi David,

Thanks for the quick response. That was also something that I tried to troubleshoot, however when I looked at the versions of Java installed on my computer I only see the 64-bit versions:

image.png

Any other ideas, or thoughts on how to open with the correct version of Java?

Thanks,

John

--
You received this message because you are subscribed to a topic in the Google Groups "gsea-help" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/gsea-help/CC_gotuYy1k/unsubscribe.
To unsubscribe from this group and all its topics, send an email to gsea-help+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gsea-help/c857545c-d607-4ed2-8c0a-7b93bd2a7d41%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

David Eby

unread,
Nov 9, 2018, 2:33:18 PM11/9/18
to gsea-help
The second item in that table is almost certainly 32-bit Java.  The "x86_64" label in the first row indicates 64-bit while the lack of it in the second likely means 32-bit.

My suggestion would be to check the "Install 64-bit Java" section of that link I sent earlier, or have your IT staff review it.  It should be unnecessary to have both 64-bit and 32-bit versions on a Windows computer.  I don't know of any good way to tell Windows how to choose which to use (I mostly use Linux myself).  The simple solution is to just remove the 32-bit version, though you might need to reinstall the 64-bit one afterward.

We'll probably be revisiting this whole situation in a future release.  The Java world has changed quite a lot recently and it's probably worth revisiting.

Regards,
David

On Saturday, November 10, 2018 at 3:12:27 AM UTC+9, John Ligon wrote:
Hi David,

Thanks for the quick response. That was also something that I tried to troubleshoot, however when I looked at the versions of Java installed on my computer I only see the 64-bit versions:

image.png

Any other ideas, or thoughts on how to open with the correct version of Java?

Thanks,

John

To unsubscribe from this group and all its topics, send an email to gsea-help+unsubscribe@googlegroups.com.

Sreepathy Ramanujam

unread,
Aug 28, 2025, 7:12:40 AM (11 days ago) Aug 28
to gsea-help

The error you are encountering, java.lang.OutOfMemoryError: Java heap space, indicates that GSEA is exhausting the amount of Java heap memory allocated to it during analysis. This usually happens when the dataset being analyzed is too large for the memory settings with which GSEA was launched. Although your machine has 8 GB of physical RAM, Java programs do not automatically use all of it, only the portion explicitly allocated via heap size parameters. If you launched GSEA with only 1 GB of heap, it is insufficient for certain workloads. Increasing heap memory will be a right direction, but the versions you tried may not have started from the browser because browser-based launches often ignore or limit custom heap settings. To handle this situation, you can try running the GSEA directly from the command line. Here, you can explicitly set the memory, such as java -Xmx4g -jar gsea.jar. Suppose if you feel the dataset is still too large, consider reducing input size (fewer permutations, smaller gene sets) or running the analysis on a machine with higher RAM. 

So overall I would say you should have an eye on confirming the 64-bit Java, launch GSEA via command line with higher heap (-Xmx), keep headroom for native memory, and reduce dataset size or permutations if needed. You can check out this blog How to Solve OutOfMemoryError: Java heap space to understand more about this Java Heap Space error.
Reply all
Reply to author
Forward
0 new messages