Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Monitoring is not supported for the selected JVM #30

Closed
GoogleCodeExporter opened this issue Sep 17, 2015 · 6 comments
Closed

Monitoring is not supported for the selected JVM #30

GoogleCodeExporter opened this issue Sep 17, 2015 · 6 comments

Comments

@GoogleCodeExporter
Copy link

I started my application for debugging, let it run to a breakpoitn, and it 
shows up in JVM explorer. When I open the Java Monitor view and select the 
application, the Properties window for JVM Monitor says "Monitoring is not 
supported for the selected JVM"

I am running JavaSE-1.6 (jdk1.6.0_18)  c:\program files (x86)\java\jdk1.6.0_18

Also trying jdk1.6.0_22  c:\program files\java\jdk1.6.0_22   Went to my debug 
configurations, launch, and set to alternate JRE jdk1.6.0_22

Tried selecting  C:\Program Files\Java\jdk1.6.0_22\bin\javaw.exe  as java 
executable for the debug default launch for my app.

I attached my Eclipse configuration  
Environment_Eclipse_About_Configuration.2010-11-29

Windows environment variables shows   java_home  C:\Progra~1\Java\jdk1.6.0_21

Path at DOS command prompt didn't seem to include a path to Java, however it 
did have c:\windows\system32\javaw.exe and java.exe...  Version for java.exe 
says Java(TM SE Runtime Environment build 1.6.0_22-b04 and java hotspot 64-bit 
server vm  build 17.1-b03, mixed mode.

So added C:\Progra~1\Java\jdk1.6.0_22\bin  to start of path. 
Changed java_home to   c:\progra~1\java\jdk1.6.0_22

Added to eclipse.ini and restarted eclipse:
-vm
C:\Progra~1\Java\jdk1.6.0_22\bin\javaw.exe

Making this change is now allowing me to "Start Monitoring" on the eclipse 
process.

Changed Debug Launch default environment to jdk1.6.0_22

Now i can profile my app....

Hopefully you can use this info to make a fix for the issue I had clearer.


Original issue reported on code.google.com by thegar...@gmail.com on 30 Nov 2010 at 4:45

Attachments:

@GoogleCodeExporter
Copy link
Author

Hi,

Thanks for reporting a bug.

After you edited eclipse.ini to run Eclipse with JDK1.6(C:\Program 
Files\java\jdk1.6.0_22) instead of JRE1.6 (C:\Program Files\Java\jre6), does 
the issue still occur when changing the debug launch configuration to 
"C:\program files (x86)\java\jdk1.6.0_18"?

Best Regards,
Yoshitaka

Original comment by yoshitak...@gmail.com on 1 Dec 2010 at 1:02

@GoogleCodeExporter
Copy link
Author

I could not reproduce the issue in the following environment that is the same 
as reported.

  OS: Windows 7 64bit
  Eclipse: 3.6.1
  JVM Monitor: 3.6.6
  JVM for Eclipse: JRE 1.6.0_22
  JVM for monitored Java application: JDK 1.6.0_18 or JDK 1.6.0_22

JVM Monitor shows the message "Monitoring is not supported for the selected 
JVM" if the target JVM cannot be connected by invoking the SUN JDK API 
com.sun.tools.attach.VirtualMachine.attach(). For example, when trying to 
connect to JVM running with JRE 1.5, the exception 
com.sun.tools.attach.AttachNotSupportedException is thrown and the message ".. 
not supported.." is shown. The message doesn't always mean a bug, but there is 
certainly a case that the JVM is not supported to be connected depending on 
environment.

If there is no additional feedback, this entry will be closed as 
not-reproducible.

Original comment by yoshitak...@gmail.com on 5 Dec 2010 at 11:29

@GoogleCodeExporter
Copy link
Author

The followings are the typical cases that JVM Monitor shows the message 
"Monitoring is not supported for the selected JVM" on Properties view on 
Windows 64bit.

 case 1) running Java app with Java 1.5

 case 2) running Java app with JRE/JDK 32bit while using Eclipse 64bit on Windows 64bit

 case 3) running Java app with JRE/JDK 64bit while using Eclipse 32bit on Windows 64bit

This bug entry seems to be the case 2, and it is expected behavior to show 
error message. On the other hand, the existing message is not that descriptive, 
so it would make sense to show additional message contained in exception 
com.sun.tools.attach.AttachNotSupportedException
on Properties view and status line when selecting the JVM on JVM Explorer as 
below.

 additional message to be shown:

 case 1) The VM does not support the attach mechanism

 case 2) Unable to attach to 32-bit process running under WOW64

 case 3) Unable to attach to 64-bit process

Original comment by yoshitak...@gmail.com on 14 Dec 2010 at 10:17

  • Changed state: Fixed

@GoogleCodeExporter
Copy link
Author

I am seeing this issue on Windows 64-bit using the latest versions of Eclipse 
(SpringSource Tool Suite 2.7, based on Eclipse Indigo) and JVM Monitor 
(3.7.0.201106191853). No additional message is shown; however, the error "Could 
not open PerfMemory" appears in the Eclipse error log (see attached).

As indicated in the attached Eclipse configuration, I am starting Eclipse using 
JDK 1.6.0_23 located in C:/Program Files/Java/jdk1.6.0_23/bin. If I start my 
Java application from a command prompt window using this path to the java 
executable explicitly (e.g., "C:\Program Files\Java\jdk1.6.0_23\bin\java ..." 
the PID shows up in JVM Explorer and I get the above error when selecting it.

The Eclipse instance also appears in JVM Explorer and I am able to attach to it.

This may be a different issue from the original poster as I think I am using 
the same VM for both Eclipse and the application I want to profile.

Original comment by maf9676...@gmail.com on 5 Jul 2011 at 9:11

Attachments:

@GoogleCodeExporter
Copy link
Author

Follow-up on the above: found a discussion related to the PerfMemory error at 
http://forums.oracle.com/forums/thread.jspa?messageID=7067232. This discussion 
indicated that this can be due to a JVM bug related to inherited permissions 
and gave a work-around of changing the TMP environment variable to reference 
C:\TMP (which must exist) for both the monitoring and monitored applications.

Doing so worked for me; perhaps the code can identify this error and provide 
the workaround?

Original comment by maf9676...@gmail.com on 5 Jul 2011 at 10:01

@GoogleCodeExporter
Copy link
Author

Hi.

Just to say the workaround about TMP variable is a mandatory FAQ entry. 
Every time I use JVMMONITOR with a new computer, I had to digg into my memory 
or google to found out this solution.

Thanks

Original comment by marcde...@gmail.com on 24 Sep 2012 at 3:49

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant