on 06-01-2022 7:23 AM
Hi all,
I am learning how to use SAP Memory Analyzer to analyze heap dump created by NetWeaver AS Java, when OutOfMemory error occurs.
But as I download SAP Memory Analyzer onto my macbook, I have this error:
The JVM shared library "/Library/Java/JavaVirtualMachines/sapmachine-jdk-18.jdk/Contents/Home/bin/../lib/server/libjvm.dylib"<br>does not contain the JNI_CreateJavaVM symbol.
In my JAVA_HOME I only have one jdk sapmachine-jdk-18.jdk, so does it mean that this jdk doesn't work for SAP Memory Analyzer?
How can I solve this? Can I install another version of jdk???
I solved it finally!!! After googling for a whole night and having tried at least 4 solutions!
I found that my eclipse.app are also Intel-based (x86_64) app and also using JVM, and it works fine. So I compare the Contents/info.plist of eclipse.app and mat.app and found they all not specify the version of jdk (because I have only one version of jdk, so they are all using it as the default one). So it must not be the jdk issue.
Then I found that mat.app is based on eclipse.app (although it is standalone instead of eclipse plug-in, which I also installed out of desparation). So I compared their Contents/Eclipse/eclipse.ini and Contents/Eclipse/MemoryAnalyzer.ini, and found one parameter occuring in eclipse but missing in mat:
-vm<br>/Users/i505432/.p2/pool/plugins/org.eclipse.justj.openjdk.hotspot.jre.full.macosx.x86_64_17.0.2.v20220201-1208/jre/lib/libjli.dylib
So I copied it in the right place, and it works like a charm!!!
p.s. other possible causes/solutions I found (not in my case):
- if you have multiple jdk, you need to specify the -vm by changing the comment in mat.app/Contents/info.plist
- check the JAVA_HOME env parameter, and export it permanantly
- check cpu architecture, but it is fine as long as the app and cpu are all 64bit, because M1 can run intel and arm and apple silicon
- install eclipse plug-in editioned Memory Analyzer: in marketplace search memory analyzer (the problem is after I installed it I cannot find where to open it in eclipse, so haven't tried)
- open jdk put its libjvm.dylib differently than other jdk sources, `/Library/Java/JavaVirtualMachines/<jdk_version>/Contents/Home/lib/server/libjvm.dylib` vs `/Library/Java/JavaVirtualMachines/<jdk_version>/Contents/Home/jre/lib/jli/libjvm.dylib`
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
11 | |
10 | |
7 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.