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 213640 - repeated profiling doesn't work
Summary: repeated profiling doesn't work
Status: VERIFIED FIXED
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 7.2
Hardware: PC Windows 7 x64
: P1 normal (vote)
Assignee: TomasKraus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-06 05:32 UTC by Vince Kraemer
Modified: 2012-06-27 08:38 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
patch (6.54 KB, patch)
2012-06-21 22:41 UTC, Petr Hejl
Details | Diff
updated patch (8.05 KB, patch)
2012-06-22 09:41 UTC, Petr Hejl
Details | Diff
final working patch (14.20 KB, patch)
2012-06-22 11:11 UTC, Petr Hejl
Details | Diff
correct patch (16.90 KB, patch)
2012-06-22 12:32 UTC, Petr Hejl
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vince Kraemer 2012-06-06 05:32:30 UTC
with GlassFish in C:\Users\jskrivanek\GlassFish_Server the following way:

- create Java EE 6 web project with GlassFish server
- right-click project node and choose Profile
- wait until profiling is started and browser is opened
- stop profiling (menu item "Profile|Stop Profiling Session")
- again right-click project node and choose Profile
- server is not started and it fails with message

compile-jsps:
In-place deployment at
D:\Development\builds\nbUserdir-20120604145844\WebApplication2\build\web
deploy?DEFAULT=D:\Development\builds\nbUserdir-20120604145844\WebApplication2\build\web&name=WebApplication2&contextroot=/WebApplication2&force=true
failed. Instance is not GlassFish Server 3+.

Product Version: NetBeans IDE Dev (Build 201206050001)
Java: 1.7.0_04; Java HotSpot(TM) 64-Bit Server VM 23.0-b21
System: Windows 7 version 6.1 running on amd64; Cp1250; en_US (nb)

This was reported in http://netbeans.org/bugzilla/show_bug.cgi?id=212011#c9 but is a distinctly different issue, so I opened this to track it on its own
Comment 1 Vince Kraemer 2012-06-06 12:33:01 UTC
tomas: you may be able to work on this one as you work on bug #212011...
Comment 2 TomasKraus 2012-06-21 12:22:15 UTC
I tested it under debugger and saw following stack trace:
INFO [org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment]
The module has not been deployed.
See the server log for details.
[catch] at org.netbeans.modules.j2ee.deployment.devmodules.api.Deployment.deploy(Deployment.java:210)
	at org.netbeans.modules.j2ee.ant.Deploy.execute(Deploy.java:111)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:392)
	at org.apache.tools.ant.Target.performTasks(Target.java:413)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.helper.SingleCheckExecutor.executeTargets(SingleCheckExecutor.java:38)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.taskdefs.Ant.execute(Ant.java:442)
	at org.apache.tools.ant.taskdefs.CallTarget.execute(CallTarget.java:105)
	at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:291)
	at sun.reflect.GeneratedMethodAccessor115.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106)
	at org.apache.tools.ant.Task.perform(Task.java:348)
	at org.apache.tools.ant.Target.execute(Target.java:392)
	at org.apache.tools.ant.Target.performTasks(Target.java:413)
	at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1399)
	at org.apache.tools.ant.Project.executeTarget(Project.java:1368)
	at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
	at org.apache.tools.ant.Project.executeTargets(Project.java:1251)
	at org.apache.tools.ant.module.bridge.impl.BridgeImpl.run(BridgeImpl.java:283)
	at org.apache.tools.ant.module.run.TargetExecutor.run(TargetExecutor.java:541)
	at org.netbeans.core.execution.RunClassThread.run(RunClassThread.java:153)
Comment 3 Petr Hejl 2012-06-21 19:14:19 UTC
Seems to be some kind of race condition. When debugging the target IDE the issue is not visible. Once debugger is disconnected the issue is reproducible on Windows, but so far does not seem to be platform specific.
Comment 4 Petr Hejl 2012-06-21 22:41:32 UTC
Created attachment 121192 [details]
patch

This patch seems to work for me. It is too late for me to do additional checks. I'm also not sure the atomic reference is really needed. Perhaps just reordering of listener registration.

As bug seem to be bit random the patch certainly need more testing. Tomasi feel free to test whether this fixes things on your setup.
Comment 5 Petr Hejl 2012-06-22 09:41:07 UTC
Created attachment 121205 [details]
updated patch
Comment 6 Petr Hejl 2012-06-22 09:52:08 UTC
I think there is one more problem as state set in j2eeserver by the profiler listener is not propagated to common part of GF.
Comment 7 Petr Hejl 2012-06-22 11:11:40 UTC
Created attachment 121211 [details]
final working patch

This is the final patch. There is one ugly WA in GF. Please verify and/or comment.
Comment 8 TomasKraus 2012-06-22 11:17:11 UTC
I'm rebuilding NetBeans with this patch but it takes time ...
Comment 9 TomasKraus 2012-06-22 11:34:08 UTC
compile:
    [mkdir] Created dir: D:\tomas\nb72\glassfish.common\build\classes
 [nb-javac] Compiling 112 source files to D:\tomas\nb72\glassfish.common\build\classes
   [repeat] D:\tomas\nb72\glassfish.common\src\org\netbeans\modules\glassfish\common\CommonServerSupport.java:80: cannot find symbol
   [repeat] symbol  : class GlassfishModule3
   [repeat] location: package org.netbeans.modules.glassfish.spi
   [repeat] import org.netbeans.modules.glassfish.spi.GlassfishModule3;
   [repeat]                                          ^
   [repeat] D:\tomas\nb72\glassfish.common\src\org\netbeans\modules\glassfish\common\CommonServerSupport.java:95: cannot find symbol
   [repeat] symbol: class GlassfishModule3
   [repeat] public class CommonServerSupport implements GlassfishModule3, RefreshModulesCookie {
   [repeat]                                             ^
   [repeat] D:\tomas\nb72\glassfish.common\src\org\netbeans\modules\glassfish\common\CommonServerSupport.java:80: cannot find symbol
Comment 10 Petr Hejl 2012-06-22 12:32:03 UTC
Created attachment 121217 [details]
correct patch

Ooops. There is missing file in the previous patch. This should work.
Comment 11 TomasKraus 2012-06-22 14:06:33 UTC
Thank you Peter. Problem is resolved also in my environment.
Now it starts glassfish correctly. Please push this fix into repository and close this bug.
Comment 12 Petr Hejl 2012-06-22 14:33:46 UTC
Fixed in web-main 74f26d341f9b.

Jirko, please verify. I suppose this should be pushed to 7.2.
Comment 13 Quality Engineering 2012-06-23 04:36:10 UTC
Integrated into 'main-golden', will be available in build *201206230002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/74f26d341f9b
User: Petr Hejl <phejl@netbeans.org>
Log: #213640 - repeated profiling doesn't work
Comment 14 Jiri Skrivanek 2012-06-25 08:10:02 UTC
Verified in dev build 201206250002. Still facing bug 214554.
Comment 15 Martin Fousek 2012-06-26 14:05:28 UTC
For sure needs good verification. ;) I didn't know gf codes in detail but I
dind't find anything wrong and the concept looks Ok to me as well.
Comment 16 Petr Hejl 2012-06-26 18:46:15 UTC
Pushed to release72 as 9432daf397db.
Comment 17 Quality Engineering 2012-06-27 03:07:36 UTC
Integrated into 'releases', will be available in build *201206262201* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/9432daf397db
User: Petr Hejl <phejl@netbeans.org>
Log: #213640 - repeated profiling doesn't work
Comment 18 Jiri Skrivanek 2012-06-27 08:38:26 UTC
Verified in NetBeans IDE 7.2 RC1 (Build 201206262201).