开发者

Eclipse memory analyser - error on trying to acquire heap dump

I am trying to acquire heap dump using the Eclipse Memory Analyzer Tool (MAT). I have Weblogic 10.3 app server running. It's a windows XP OS with 32 bit Java installed. Wh开发者_StackOverflow社区en I try to acquire heap dump using MAT for the process that's running Weblogic, I am getting the following error:

Error creating heap dump. jmap exit code = 1
Exception in thread "main" java.io.IOException: Premature EOF
    at sun.tools.attach.HotSpotVirtualMachine.readInt(HotSpotVirtualMachine.java:226)
    at sun.tools.attach.WindowsVirtualMachine.execute(WindowsVirtualMachine.java:88)
    at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:195)
    at sun.tools.attach.HotSpotVirtualMachine.dumpHeap(HotSpotVirtualMachine.java:162)
    at sun.tools.jmap.JMap.dump(JMap.java:224)
    at sun.tools.jmap.JMap.main(JMap.java:122)

Error creating heap dump. jmap exit code = 1
Exception in thread "main" java.io.IOException: Premature EOF
    at sun.tools.attach.HotSpotVirtualMachine.readInt(HotSpotVirtualMachine.java:226)
    at sun.tools.attach.WindowsVirtualMachine.execute(WindowsVirtualMachine.java:88)
    at sun.tools.attach.HotSpotVirtualMachine.executeCommand(HotSpotVirtualMachine.java:195)
    at sun.tools.attach.HotSpotVirtualMachine.dumpHeap(HotSpotVirtualMachine.java:162)
    at sun.tools.jmap.JMap.dump(JMap.java:224)
    at sun.tools.jmap.JMap.main(JMap.java:122)

Any help is appreciated.

Thanks, Sid


One thing you could try is using jmap to save the dump and open it in MAT.

Use jps to get the process id (pid).

jmap -dump:live,format=b,file=myfile.hprof <processid-from-above>


I met the same problem on Windows, I solved by open cmd.exe as Administrator.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜