dynamic attach fails when using intellij dynamic classpath
Aleksey Shipilev
aleksey.shipilev at oracle.com
Fri May 15 11:02:53 UTC 2015
Hi,
On 05/14/2015 10:00 PM, Brian Harris wrote:
> I have tested with Intellij versions 12,13,14. Any ideas what the problem
> is? Using debugger I can see that it blows up on this line
> inside org.openjdk.jol.util.InstrumentationSupport#tryDynamicAttach
>
> vmClass.getDeclaredMethod("loadAgent", String.class, String.class)
> .invoke(vm, agentFile.getAbsolutePath(), "");
>
>
> However, debugger shows seemingly equivalent values for vmClass and vm and
> agentFile in both pass and fail scenarios, so I'm a bit stuck.
Actually, that code delivers a few "legitimate" exceptions that are
ignored in InstrumentationSupport.instance(). Adding
"ignored.printStackTrace()" there helps to diagnose the issues.
I have pushed two minor corrections to our dynamic attach code, and at
least my IDEA 14 now works fine with "dynamic.classpath" = true. See:
https://bugs.openjdk.java.net/browse/CODETOOLS-7901425
http://hg.openjdk.java.net/code-tools/jol/rev/9d15f184835e
We are going to release next patch update soon (today), so please check
this out as soon as possible.
Thanks,
-Aleksey.
More information about the jol-dev
mailing list