JAVA: Read HashMap object Content from Heapdump

Viewed 234

i need to analyze an OOM more deeper and need to find out, which objects cause the OOM inside of the T4CPreparedStatement JDBC Layer from oracle. So therefore i am looking for the content inside the HashMap (java.util.Hashtable$Entry[]).

  • Is this possible from the HeapDump?
  • Is this possible via JMX connection?

My HeapDump (*.phd files) was created by Websphere Application Server automatically during OOM.

PS: probably it can be done in the Eclipse Memory Analyzer Tool with the IBM Extensions but how?

1 Answers

PHD files do not have primitive field values or primitive array contents so at best you could see the types of keys and values in a HashMap.

The hash map collection query will fail with: "Dump format 'DTFJ-PHD' does not support inspection 'Hash Entries'."

'Show objects by class' might help to see what sorts of things are held:

    Class Name                               | Objects | Shallow Heap
    ------------------------------------------------------------------
    java.util.HashMap                        |       1 |           40
    |- java.lang.Class                       |       1 |          160
    |- java.util.HashMap$Node[]              |       1 |          136
    |  |- java.util.HashMap$Node             |      10 |          240
    |  |  |- sun.misc.URLClassPath$JarLoader |       9 |          504
    |  |  |- java.lang.Class                 |       1 |          160
    |  |  |- java.lang.String                |      10 |          160
    |  |  |- java.util.HashMap$Node          |       4 |           96
    |  |  |- sun.misc.URLClassPath$FileLoader|       1 |           24
    |  |  '- Total: 5 entries                |         |             
    ------------------------------------------------------------------

Really you need a system dump.

Related