This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 144413

Summary: Unable to integrate profiler with Enterprise Application
Product: profiler Reporter: dheffelfinger <dheffelfinger>
Component: BaseAssignee: issues@profiler <issues>
Status: VERIFIED FIXED    
Severity: blocker Keywords: REGRESSION
Priority: P1    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:
Attachments: messages.log

Description dheffelfinger 2008-08-19 16:45:26 UTC
Attempting to profile an Enterprise Application for the first time, by right clicking on the project, then selecting
"Profile" results in a dialog stating that the profiler is not integrated with the project, and asking the user to click
"OK" to integrate the profiler.

Clicking OK results in a warning dialog: "Cannot get exclusive access to /home/user/NetBeans
Projects/MyEnterpriseProject/build.xml (probably opened for reading)." In addition to the expected "Profile
MyEnterpriseProject" dialog (both dialogs pop up).

Ignoring the warning and attempting to profile the application anyway results in the following error message in the
output log: "Target "profile-j2ee" does not exist in the project "MyEnterpriseProject".
BUILD FAILED (total time: 0 seconds)"
Comment 1 Tomas Hurka 2008-08-19 17:04:20 UTC
I am not able to reproduce it. Can you please attach NetBeans message.log. Thanks.
Comment 2 dheffelfinger 2008-08-19 17:09:17 UTC
Created attachment 67829 [details]
messages.log
Comment 3 dheffelfinger 2008-08-19 17:10:27 UTC
messages.log attached as requested.
Comment 4 Tomas Hurka 2008-08-19 19:44:59 UTC
Thanks. Can you please provide steps how to reproduce it? 
Comment 5 dheffelfinger 2008-08-19 21:03:42 UTC
Nothing out of the ordinary, really.

1. Right click on an enterprise project and select "Profile".
2. Click "OK" in the resulting dialog to integrate the profiler with the project.

At this point two dialogs pop up: "Cannot get exclusive access..." and "Profile Project" The "Cannot get exclusive
access" dialog is "unclickable", since the "Profile Project" dialog is modal. Clicking "run" in the "Profile Project"
window results in the output window displaying the following message:

output log: "Target "profile-j2ee" does not exist in the project "MyEnterpriseProject".
BUILD FAILED (total time: 0 seconds)"
Comment 6 dheffelfinger 2008-08-19 21:23:24 UTC
Issue seems to have stopped happening on nightly build 200808190201 after recalibrating the profiler, however it is
still occurring on NB 6.5 beta even after recalibrating the profiler.
Comment 7 Tomas Hurka 2008-08-20 13:36:22 UTC
We are able to reproduce it, but the steps are rather complicated.
1) Create sample project "Annotate Override Interceptor" 
2) Run it with GlassFish V2
3) Stop GlassFish
4) Profile "Annotate Override Interceptor"


Comment 8 Tomas Hurka 2008-08-20 13:38:02 UTC
This is regression caused by fix of issue #132721. The output stream for reading build.xml file is not closed.

Comment 9 Jiri Sedlacek 2008-08-20 13:54:52 UTC
Fixed in main.


changeset:   96949:8c511832ec46
date:        Wed Aug 20 14:53:53 2008 +0200
summary:     Fixed #144413 and #144588 : partial revert of reading project buildscript.
Comment 10 dheffelfinger 2008-08-21 15:13:28 UTC
As of build 200808210201 the problem persists. Any idea when the fix will hit the nightly builds?
Comment 12 Quality Engineering 2008-08-22 06:09:12 UTC
Integrated into 'main-golden', available in build *200808220201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/8c511832ec46
User: Jiri Sedlacek <jis@netbeans.org>
Log: Fixed #144413 and #144588 : partial revert of reading project buildscript.
Comment 13 dheffelfinger 2008-08-22 15:18:40 UTC
I downloaded build 200808220201 and was able to profile the test enterprise application, thanks. However, the first time
I tried to profile the project an InvocationTargetException occurred. I submitted the new issue:
http://statistics.netbeans.org/analytics/detail.do?id=96738
Comment 14 Jiri Sedlacek 2008-08-25 15:28:14 UTC
Tracked by Issue 144884 - already fixed.
Comment 15 mariadavydova 2008-11-25 12:21:04 UTC
verified in Build 200811250201