Bug 75761 - Profiler tries to connect to target VM forever
Profiler tries to connect to target VM forever
Status: RESOLVED DUPLICATE of bug 72941
Product: profiler
Classification: Unclassified
Component: Base
5.x
All Windows XP
: P3 (vote)
: 6.x
Assigned To: issues@profiler
issues@profiler
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-05-02 06:17 UTC by massimo
Modified: 2006-10-23 16:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
:


Attachments
final dialog that shows after the timeout on connecting to the JVM (62.60 KB, image/gif)
2006-05-02 06:19 UTC, massimo
Details
messages.log of NetBeans IDE 5 (244.00 KB, text/plain)
2006-05-02 06:27 UTC, massimo
Details
output window in NetBeans IDE (21.35 KB, text/plain)
2006-05-02 22:05 UTC, massimo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description massimo 2006-05-02 06:17:25 UTC
Tried to use the profiler today, but it does not seem to connect to the application.
Application is a NetBeans suite and it is composed by several modules.
I launch the suite normally from the project area in NetBeans IDE: right-click
on the parent node of the suite and choose "Run" from the contextual menu. It
always works fine.
But if i click "Profile" something starts and after a bit teh IDE shows the
Profiler Area, after which, a progress window pops up and stays forever spinning
saying: "Connecting to the target VM...". After 10 minutes or so, a dialog pops
up saying "Failed to establish socket connection with the target JVM".
Tried the profiler on a dummy java application and it works fine.

Using jdk 1.5 update 6 as instructed, for both the suite and the profiler.
Comment 1 massimo 2006-05-02 06:19:42 UTC
Created attachment 30150 [details]
final dialog that shows after the timeout on connecting to the JVM
Comment 2 massimo 2006-05-02 06:27:52 UTC
Created attachment 30151 [details]
messages.log of NetBeans IDE 5
Comment 3 massimo 2006-05-02 22:05:47 UTC
Created attachment 30185 [details]
output window in NetBeans IDE
Comment 4 massimo 2006-05-02 23:39:15 UTC
Last attachment posted is what NetBeans IDE writes in its output window after i
launch the profiler on my suite.
The last line says:
---
Could not find agent library in absolute path: C:/Program
---
which is obviously incorrect, because that MS Windows path contains a space
(C:\Program Files).
But why does it do that on a Suite Module project type, while for a Java
Application project type works fine?
Comment 5 massimo 2006-05-03 02:29:17 UTC
Reinstalled both Java and NetBeans today under a directory different from
"Program Files", containing no spaces: c:\Java\netbeans-5.0.
Profiler now connects to the JVM, and works when you pick "Monitor Application",
but still has problems connecting to the JVM when choosing the other options
available: Analyze performance, Analyze Code Fragment Performance, Analyze
memory Usage, Run Custom Profiling.
Comment 6 massimo 2006-05-09 22:10:03 UTC
Summarizing all i found about this issue here:
1) if NetBeans is installed in a directory like "c:\Program Files\netbeans" the
profiler does not work, apparently because it cannot resolve a path that contain
spaces.
2) the profiler cannot profile the entire branded application. If you choose
"Analyze Performance" and then click the radio button "Entire Application", the
Take a snapshot button is grayed out. So, you cannot profile the entire
application. It only works when you select a portion of the application to
profile (radio button "Part of Application", button "Select..."). In that case,
the Take snapshot button is enabled. 
Comment 7 J Bachorik 2006-08-09 10:04:24 UTC
As of 1) This is a duplicate of #72941
As of 2) I suppose your project is pretty big and when you are trying to profile
the entire application it would require to load and instrument thousands of
classes which can take a serious amount of time. The "Take snapshot" button is
grayed out because there are no results available - the engine is busy with
instrumenting methods. I would suggest using the "Part of Application" mode to
lower the number of methods being instrumented at the startup.

*** This issue has been marked as a duplicate of 72941 ***
Comment 8 J Bachorik 2006-08-09 10:05:32 UTC
target milestone changed


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo