Search code examples
javatomcatout-of-memoryjhat

JHAT cannot analyze a memory dump


I have a Memory Dump file and JHAT gives the following message and I cannot analyze anything (as no data is displayed.

 Resolving 0 objects...

WARNING:  hprof file does not include java.lang.Class!

WARNING:  hprof file does not include java.lang.String!

WARNING:  hprof file does not include java.lang.ClassLoader!

Does this mean the hprof file is incomplete or corrupt?

I am using
-XX:+HeapDumpOnOutOfMemoryError" option in my tomcat.


Solution

  • I just came across this same issue with my own heap dump.

    • jhat shows the warnings you describe, and there's no useful data displayed
    • Eclipse MAT complains about a NullPointerException
    • VisualVM can't open the heap dump file at all

    It looks like this happens when there is not enough disk space at the time that the heap is dumped, so the file is indeed incomplete/corrupt.

    http://forums.oracle.com/forums/thread.jspa?threadID=1175621&tstart=135