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 128790 - Stop Application does not work anymore
Summary: Stop Application does not work anymore
Status: VERIFIED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Grails (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P3 blocker (vote)
Assignee: schmidtm
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-29 08:54 UTC by bennyv
Modified: 2009-11-07 10:55 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description bennyv 2008-02-29 08:54:26 UTC
When I start a Grails Application using Run Application from the Context menu, I cannot stop it using context menu -> 
Stop Application or by cancelling it from the lower right corner. I am using NB 6.1 latest daily (build 200802270005) 
and g&g plugin (Version 1.1, Source Latest Development Build)
Comment 1 schmidtm 2008-03-04 22:37:21 UTC
stopping the running grails server end's up in a call to java.lang.Process.destroy(). This works fine for Linux and Mac OSX (JDK 1.5). Nevertheless i can 
confirm that it doesn't work for Windows. It probably slipped our attention, that it never worked on this platform. Stay tuned for more investigations.
Comment 2 schmidtm 2008-03-05 09:57:06 UTC
Ok, here's my status report on this pretty nasty issue:

a) It's reproducable on JDK6 as well
b) Process.destroy() never worked, since we are dealing with a process group: Netbeans - cmd.exe (grails.bat) - java.exe

This is explained in great detail here: 

(process) Process.destroy does not kill multiple child processes
http://bugs.sun.com/view_bug.do?bug_id=4770092

c) Possible solutions/workarounds (not sure whether they are actually feasable)

1.) try to find the right org.codehaus.groovy.grails.cli.support.GrailsStarter java program using windows (onboard)
tools like: wmic, tasklist and kill them using: taskkill

2.) Try to exclude the grails.bat startup-script altogether and start java/w.exe directly.

These two options have to be carefully discussed and evaluated.
Comment 3 schmidtm 2008-04-07 16:53:03 UTC
This is (hopefully) now fixed:

http://hg.netbeans.org/main/contrib/rev/fa372d350cd2

Someone with Vista should verify.
Comment 4 Quality Engineering 2008-05-20 05:12:52 UTC
Integrated into 'main-golden', available in NB_Trunk_Production #206 build
Changeset: http://hg.netbeans.org/main/rev/48fda0407ff6
User: Matthias Schmidt <schmidtm@netbeans.org>
Log: Fix for #128790, solution for Windows XP+ using wmic.exe and taskkill
Comment 5 Lukas Jungmann 2008-10-03 14:43:10 UTC
v.