Java Heap Dump error - Metadata does not appear to be polymorphic

I had this issue on CentOS even when running as the user that started the process. What solved it for me was installing the debuginfo package corresponding to the package supplying the jmap utility.

To install the debuginfo package, see this answer (substituting your java package for glibc). It requires getting/using the debuginfo-install utility, and making sure the CentOS-Debuginfo.repo is set up correctly and enabled.


Ok, I found it.

I was running the jmap command as root, but I had to run as the user that started the java process.

In my case:

sudo -u robau ./jmap -dump:format=b,file=/tmp/dump.bin 14984

Seems to be related to this JDK bug: https://bugs.openjdk.java.net/browse/JDK-8075773


I ran into the same issue with trying to run jmap on an AWS ElasticBeanstalk instance. The command that fixed it was

sudo debuginfo-install java-1.8.0-openjdk-devel

BTW, jmap was installed on the AWS ElasticBeanstalk instance with command

sudo yum install java-1.8.0-openjdk-devel-1.8.0.91-0.b14.10.amzn1.x86_64