Graphlayout fails in jetty/spring
Akbar Bash
akbar.bs at gmail.com
Sat Jul 20 01:53:11 UTC 2019
I am running a web app in jetty and trying to measure the size of one of
the instances.
When i tried from console I am getting the below warnings followed by
classnotfound error
# WARNING: Unable to get Instrumentation. Dynamic Attach failed. You may
add this JAR as -javaagent manually, or supply -Djdk.attach.allowAttachSelf
# WARNING: Unable to attach Serviceability Agent. Unable to attach even
with module exceptions: [org.openjdk.jol.vm.sa.SASupportException: Sense
failed., org.openjdk.jol.vm.sa.SASupportException: Sense failed.,
org.openjdk.jol.vm.sa.SASupportException: Sense failed.]
java.lang.ClassNotFoundException:
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at org.openjdk.jol.util.ClassUtils.loadClass(ClassUtils.java:70)
at
org.openjdk.jol.operations.ClasspathedOperation.run(ClasspathedOperation.java:76)
at org.openjdk.jol.Main.main(Main.java:60)
I provided as javaagent library as part of the jetty startup configuration.
When I used the GraphLayout API in the code. parseInstance() never
returns. The instance is wired using Spring.
Can you please let me know what should be the problem.
Regards,
Akbar
More information about the jol-dev
mailing list