This discussion is archived
0 Replies Latest reply: Apr 11, 2013 12:10 PM by 684777 RSS

Unable to attach to target VM

684777 Newbie
Currently Being Moderated
I am trying to executed jdb connect in Windows environment using following command C:\jdk1.6.0_33\bin>jdb -connect sun.jvm.hotspot.jdi.SAPIDAttachingConnector:pid=38156 and I am getting message below. I am running jdk 1.6 and java process I am trying to attach is a stand alone java application compiled with java 1.6 compiler running continuously.

Executing command C:\jdk1.6.0_33\bin>jdb -listconnectors produce output below indicating that SAPIDAttachingConnector is supported.

Connector: sun.jvm.hotspot.jdi.SAPIDAttachingConnector Transport: local proce
description: This connector allows you to attach to a Java process using the
Serviceability Agent

Required Argument: pid (no default)
description: PID of a Java process

Why do I get error Fatal error: Unable to attach to target VM?
at sun.jvm.hotspot.jdi.SAPIDAttachingConnector.attach(SAPIDAttachingConn
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
at java.lang.reflect.Method.invoke(
at sun.jvm.hotspot.jdi.SAPIDAttachingConnector.createVirtualMachine(SAPI
at sun.jvm.hotspot.jdi.SAPIDAttachingConnector.attach(SAPIDAttachingConn
... 4 more
Caused by: sun.jvm.hotspot.debugger.DebuggerException: Windbg Error: WaitForEven
t failed!
at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach0(Native Me
at sun.jvm.hotspot.debugger.windbg.WindbgDebuggerLocal.attach(WindbgDebu
at sun.jvm.hotspot.HotSpotAgent.attachDebugger(
at sun.jvm.hotspot.HotSpotAgent.setupDebuggerWin32(
at sun.jvm.hotspot.HotSpotAgent.setupDebugger(
at sun.jvm.hotspot.HotSpotAgent.go(
at sun.jvm.hotspot.HotSpotAgent.attach(
at sun.jvm.hotspot.jdi.VirtualMachineImpl.createVirtualMachineForPID(Vir
... 10 more

Fatal error:
Unable to attach to target VM.

thank you


  • Correct Answers - 10 points
  • Helpful Answers - 5 points