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 155021 - cannot stop grails app
Summary: cannot stop grails app
Status: RESOLVED FIXED
Alias: None
Product: groovy
Classification: Unclassified
Component: Grails (show other bugs)
Version: 6.x
Hardware: All Windows Vista
: P2 blocker with 2 votes (vote)
Assignee: Petr Hejl
URL:
Keywords: RANDOM
: 155470 159348 160993 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-09 11:52 UTC by Lukas Jungmann
Modified: 2009-07-08 18:22 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
messages.log (40.13 KB, text/plain)
2009-02-17 13:54 UTC, pfernley
Details
binary patch (108.35 KB, application/octet-stream)
2009-02-19 13:25 UTC, Petr Hejl
Details
Truncated message log file (27.21 KB, text/plain)
2009-02-20 10:27 UTC, pfernley
Details
messages.log file for failed stop of jetty (grails project). (39.84 KB, text/plain)
2009-02-24 17:05 UTC, meinholz
Details
messages.log from nightly build (jetty java process not stopping) (298.19 KB, text/plain)
2009-02-24 20:59 UTC, meinholz
Details
new message.log with nightly build 0225 (37.82 KB, text/plain)
2009-02-26 14:52 UTC, meinholz
Details
binary patch (118.35 KB, application/octet-stream)
2009-03-02 20:14 UTC, Petr Hejl
Details
updated binary patch (122.53 KB, application/octet-stream)
2009-03-03 12:58 UTC, Petr Hejl
Details
This is a file you requested (27.88 KB, text/plain)
2009-04-07 05:57 UTC, dmitry_skorikov
Details
6.7M3 binary patch (123.25 KB, application/octet-stream)
2009-04-07 21:51 UTC, Petr Hejl
Details
starting IDE with 2 grails projects (63.76 KB, text/plain)
2009-04-09 12:22 UTC, dmitry_skorikov
Details
failed second time stop (29.12 KB, text/plain)
2009-04-09 12:24 UTC, dmitry_skorikov
Details
binary patch (123.47 KB, application/octet-stream)
2009-04-09 22:45 UTC, Petr Hejl
Details
Last thing, I hope: when I set 8090 port for use by grails app it not stopped by pressing red square button (33.94 KB, text/plain)
2009-04-14 06:13 UTC, dmitry_skorikov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Jungmann 2008-12-09 11:52:06 UTC
-run some grails app (grails 1.0.4)
-stop it from services tab -> grails -> app on 8080

=>
 expected: application is stopped
 actual: application keeps running (at least Config.groovy from grails remains locked)
Comment 1 Petr Hejl 2008-12-10 15:26:11 UTC
I could not reproduce this on Vista. This configuration parameter could provide us more details:
-J-Dorg.netbeans.modules.groovy.grails.level=0
Comment 2 Petr Hejl 2009-02-03 15:23:16 UTC
Any details? ;)
Comment 3 pfernley 2009-02-11 11:52:28 UTC
I don't know whether I'm supposed to use this area since I'm not the one who logged the bug nor the one expected to 
fix it, but I too have this problem and I am using Vista. ANY form of restart will cause the Grails app to disconnect 
itself from the 'output' window in NetBeans and will eventually cause the app to give out weird errors (of which one 
of the more understandable is 'No session'). By 'restart' I mean either stopping the app manually, and then starting 
it again manually OR, whilst the app is running, editing a file that causes Grails to re-load (e.g. editing a Domain 
class).

Simply exiting NetBeans and re-starting the IDE again is NOT sufficient to clear the problem. I have to log out of my 
account in Vista and then log back in again.

Regards,

Paul Fernley
Comment 4 Petr Hejl 2009-02-16 14:58:13 UTC
*** Issue 155470 has been marked as a duplicate of this issue. ***
Comment 5 Petr Hejl 2009-02-16 15:06:50 UTC
Hi Paul & meinholz,
it is caused by the fact that the by running the grails app you actually start the whole process tree. By stopping you
kill just parent however. We are trying to do our best to kill the whole tree from NetBeans. It is a bit tricky area and
actually there is an old bug/enhancement for JDK to allow this. In order to reproduce this issue I need an exact version
of the operating system (including edition - Home, Prof..). Also please try to reproduce the behavior while running the
NetBeans with command line parameter -J-Dorg.netbeans.modules.groovy.grails.level=0 and send us the log file
($HOME/.netbeans/your_version/var/log/messages.log).

Thanks.
Comment 6 pfernley 2009-02-17 13:54:05 UTC
Created attachment 77068 [details]
messages.log
Comment 7 pfernley 2009-02-17 14:00:26 UTC
Hi,

I'm running Windows Vista Ultimate and I'm right up to date with patches. I ran netbeans using the parameters you 
suggested. I ran my application, stopped it and then re-started it. On the second run of the application, it fell over 
after a short while with an 'Unable to initialize proxy. No session' error. I have uploaded my messages.log file.

Regards,

Paul
Comment 8 Petr Hejl 2009-02-19 13:22:54 UTC
Hi Paul,
I prepared binary patch tracking down the way process is killed (attaching). Could you please
1) download the daily build http://bits.netbeans.org/download/trunk/nightly/latest/
2) copy the attached jar to netbeans_inst_dir\groovy1\modules, replacing the original one
3) run netbeans with -J-Dorg.netbeans.modules.groovy.grails.level=0
4) attach the messages.log

This will show us what the problem is (at least for your case).

Thanks.
Comment 9 Petr Hejl 2009-02-19 13:25:39 UTC
Created attachment 77152 [details]
binary patch
Comment 10 pfernley 2009-02-20 10:27:23 UTC
Created attachment 77194 [details]
Truncated message log file
Comment 11 Petr Hejl 2009-02-20 10:39:26 UTC
Hi Paul,
I forgot to add (to mentioned steps) - run NetBeans and try to run and stop the grails application. Can you please do so
and attach the whole log (even zipped)?

Thanks a lot!
Comment 12 pfernley 2009-02-20 10:41:34 UTC
This is getting a bit complicated! Since your last email I had to change my development environment to use Grails 1.1 
beta and groovy 1.6 beta as I needed some of the new facilities for the system I'm developing. This introduces a new 
set of variables, of course, since NB 6.5 is not set up to work with Grails 1.1. Nevertheless, I managed to get my 
system up and running with only a couple of minor issues outstanding. What is obvious, using NB production 6.5, is 
that the scanning/indexing processes that NB seems so fond of (and of which I have logged a bug in the past), now 
NEVER finish and the only way to stop the IDE is to log out of Windows.

Nevertheless, I did as you asked and installed the NB devlopment release 200902190601 and the additional library you 
provided. As requested, I started NB with the parameters you specified. The application would not start due to an 'out 
of java heap memory' error. I noticed in the console window from which I had started NB, that there was a message 
being repeated indefinitely. This is reflected in the messages.log file I have uploaded and I have therefore truncated 
the log file since, otherwise, it would have been never-ending.

Regards,

Paul
Comment 13 meinholz 2009-02-24 17:05:14 UTC
Created attachment 77309 [details]
messages.log file for failed stop of jetty (grails project).
Comment 14 meinholz 2009-02-24 17:11:44 UTC
I am on XP Professional SP3. I am using jdk-1.6.0_12. I am now using grails 1.1 RC1.

I have attached a log file. I had deleted the existing log file, made sure that there were not java processes started,
started netbeans, ran my grails project, tested it, stopped netbeans, verified java process was still running, then
killed it.

I hope this helps (and you guys keep going with grails support!!!!!!!). It's nice to have open source option. Thanks,

Lloyd
Comment 15 Petr Hejl 2009-02-24 19:15:04 UTC
Hi Lloyd,
do you think you could accomplish the same with recent daily build
(http://bits.netbeans.org/download/trunk/nightly/latest/ do not care about "Changing source level" in messages.log it is
just a warning) and Grails 1.0.x?

Thanks,
P. 
Comment 16 meinholz 2009-02-24 20:57:27 UTC
I got the same behavior with the nightly build. I have attached messages.log. I still had to manually kill the
java/jetty process. I had loaded a grails 1.0.4 version of my project, still using jdk-1.6.0_12 and Windows XP Pro SP3.

BTW, enjoyed your interview on Grails Podcast.

Also, project scanning takes 2-3 minutes with only one simple grails app. I hope you guys can fix that next release. I
know it's another non-related issue.

Lots of log messages about something trying to set the source level to 1.3.

Thanks for the work,

Lloyd
Comment 17 meinholz 2009-02-24 20:59:20 UTC
Created attachment 77319 [details]
messages.log from nightly build (jetty java process not stopping)
Comment 18 Petr Hejl 2009-02-24 21:16:06 UTC
Does the messages.log includes application stopping? If so the patch didn't make it to daily :(

Could you please test it with
http://deadlock.netbeans.org/hudson/job/trunk/5134/artifact/nbbuild/dist/zip/netbeans-hudson-trunk-5134-java.zip and
send the message.log?

I really appreciate your help - I can't reproduce this.

Scanning takes longer when the project is opened for the first time. Anyway I would like to find a way to improve it.
Comment 19 meinholz 2009-02-24 21:27:44 UTC
can't download the hudson link...
Comment 20 Petr Hejl 2009-02-24 21:45:04 UTC
Oops bad luck. Deleted from server just before you could download it :(
Could you try the last one?
http://deadlock.netbeans.org/hudson/job/trunk/5136/artifact/nbbuild/dist/zip/netbeans-hudson-trunk-5136-java.zip
Comment 21 meinholz 2009-02-26 14:51:51 UTC
I got the same behavior with last nightly build (netbeans-trunk-nightly-200902251401-java-windows.exe). I am attaching
the messages.log. look like no pid required. Is 6.7M2 worth testing or some code base?

Lloyd
Comment 22 meinholz 2009-02-26 14:52:57 UTC
Created attachment 77410 [details]
new message.log with nightly build 0225
Comment 23 Petr Hejl 2009-03-01 19:56:13 UTC
*** Issue 159348 has been marked as a duplicate of this issue. ***
Comment 24 Petr Hejl 2009-03-02 20:12:27 UTC
Hi Lloyd,
I think I have a fix. Could you download the latest daily build and update
netbeans\groovy1\modules\org-netbeans-modules-groovy-grails.jar with the attached binary patch? I would also recommend
cleaning the ${user.home}\.netbeans\dev\var up.

Let me know if the patch works for you. I tested it myself and it works for me on Vista and xp.

Thanks,
P.
Comment 25 Petr Hejl 2009-03-02 20:14:29 UTC
Created attachment 77574 [details]
binary patch
Comment 26 Petr Hejl 2009-03-03 12:57:30 UTC
Updated binary patch should handle IDE exiting properly.
Comment 27 Petr Hejl 2009-03-03 12:58:55 UTC
Created attachment 77621 [details]
updated binary patch
Comment 28 meinholz 2009-03-03 14:13:25 UTC
Petr,

The latest jar fixed the problem. I was able to terminate the jetty process with the red-square on the Output Window and
also with the red-x on the Netbeans application window. Thanks,

Lloyd
Comment 29 Petr Hejl 2009-03-03 14:31:40 UTC
Ok, thanks!

Fixed in main 95de65cb0b1a.
Comment 30 Quality Engineering 2009-03-06 09:18:15 UTC
Integrated into 'main-golden', will be available in build *200903060201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/95de65cb0b1a
User: phejl@netbeans.org
Log: #155021 cannot stop grails app
Comment 31 Petr Hejl 2009-03-26 22:32:55 UTC
*** Issue 160993 has been marked as a duplicate of this issue. ***
Comment 32 dmitry_skorikov 2009-04-06 06:52:16 UTC
There is a same problem with Netbeans 6.7M3 on Windows Vista x64:
Pressing red square in output view does not kill grails process

I've downloaded latest patch
(http://www.netbeans.org/nonav/issues/showattachment.cgi/77621/org-netbeans-modules-groovy-grails.jar), but after
starting IDE an error window popups "Warning - could not install some modules: Grails Project - The module Grails
Platform was requested in version >= 1.15 but only 1.12 was found. Another module could not be installed due to the
above problems."
Comment 33 Petr Hejl 2009-04-06 10:22:39 UTC
Hi dmitry,
do not use the patch anymore. In the latest 6.7M3 or daily the change in the patch is applied.

Could you try this to help us?
1) run netbeans (6.7M3 or daily) with -J-Dorg.netbeans.modules.groovy.grails.level=0
2) start the application, try to stop it
3) attach the ${user.home}/.netbeans/version/var/log/messages.log to the issue

Thanks.
Comment 34 dmitry_skorikov 2009-04-07 05:57:49 UTC
Created attachment 79581 [details]
This is a file you requested
Comment 35 Petr Hejl 2009-04-07 21:45:49 UTC
Can reproduce, reopening.
Comment 36 Petr Hejl 2009-04-07 21:50:38 UTC
Hi Dmitry,
I think I have a fix. The following patch should be applicable to 6.7M3. Please replace the file
netbeans\groovy1\modules\org-netbeans-modules-groovy-grails.jar with the new one. Also delete directory
${user.home}\.netbeans\dev\var.

Let me know whether the patch works for you.

Thanks,
P.
Comment 37 Petr Hejl 2009-04-07 21:51:45 UTC
Created attachment 79685 [details]
6.7M3 binary patch
Comment 38 Petr Hejl 2009-04-07 21:53:52 UTC
Dmitry, would be great if you could test this.
Comment 39 dmitry_skorikov 2009-04-08 06:35:02 UTC
I tested patch and it WORKS in 32-bit jvm,
but does not in 64-bit jvm (it kills jetty started in 32-bit jvm, but not in 64-bit jvm) 

(I use 32-bit jvm, so 64-bit issues are not matter for me)

Also it doesn't kill jetty started in 32-bit jvm when I press X-button in bottom statusbar (right after blue "Running"
progressbar)
Comment 40 dmitry_skorikov 2009-04-08 06:38:05 UTC
To be more precise: patch works only for netbeans started in 32-bit jvm and jetty started in 32-bit jvm
Comment 41 dmitry_skorikov 2009-04-08 06:43:51 UTC
update: jetty still running after closing NetBeans IDE
Comment 42 dmitry_skorikov 2009-04-08 07:01:09 UTC
update: it stops working after I add some grails classes from IDE.

1. Start IDE
2. Start Grails app
3. Press Red square button

jetty process stopped

4. Create grails service class from IDE (using context menu)
5. Start Grails app
6. Press Red square button

jetty process still running
Comment 43 Petr Hejl 2009-04-08 09:44:58 UTC
I integrated the patch to the web-main 6021fb44c325.
Comment 44 Petr Hejl 2009-04-08 09:50:16 UTC
Well I don't think it is related to the sole fact of 64bit jvm or service class. It seems to be somehow random.

Dmitry, could you provide couple of messages.log the way described in desc34 with the patch applied for the different
situations you described?

Thanks,
P.
Comment 45 dmitry_skorikov 2009-04-09 12:20:46 UTC
OK, there 2 message.logs from situations where jetty continues working after stopping application in IDE:
1) Starting IDE, that contains 2 grails projects (app and plugin), and running app. Pressed red square button.
2) Starting IDE, that contains 1 grails project. Jetty successfully stoppped after pressing statusbar X button, but
after second run and pressing statusbar X button jetty continues to work
Comment 46 dmitry_skorikov 2009-04-09 12:22:06 UTC
Created attachment 79809 [details]
starting IDE with 2 grails projects
Comment 47 dmitry_skorikov 2009-04-09 12:24:13 UTC
Created attachment 79810 [details]
failed second time stop
Comment 48 Quality Engineering 2009-04-09 19:22:29 UTC
Integrated into 'main-golden', will be available in build *200904091401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6021fb44c325
User: phejl@netbeans.org
Log: #155021 cannot stop grails app
Comment 49 Petr Hejl 2009-04-09 22:44:11 UTC
Hi Dmitry,
I believe the following patch should solve the problem finally. Installation is the same as for the previous (don't
forget to delete var directory). Please let me know in any case.

Thanks a lot.
P.
Comment 50 Petr Hejl 2009-04-09 22:45:06 UTC
Created attachment 79855 [details]
binary patch
Comment 51 dmitry_skorikov 2009-04-10 06:55:26 UTC
Thank's! It seems that problem is solved
Comment 52 Petr Hejl 2009-04-10 08:31:07 UTC
Fixed in web-main c3698c9d9c01.

Thanks for your help Dmitry!
Comment 53 Quality Engineering 2009-04-10 19:45:08 UTC
Integrated into 'main-golden', will be available in build *200904101401* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/c3698c9d9c01
User: phejl@netbeans.org
Log: #155021 cannot stop grails app
Comment 54 dmitry_skorikov 2009-04-14 06:13:05 UTC
Created attachment 80018 [details]
Last thing, I hope: when I set 8090 port for use by grails app it not stopped by pressing red square button
Comment 55 Petr Hejl 2009-04-14 11:37:59 UTC
Reopening - see the last comment.
Comment 56 Petr Hejl 2009-04-14 12:41:35 UTC
Fixed in web-main 6446928ca4d7.
Comment 57 Quality Engineering 2009-04-15 07:45:12 UTC
Integrated into 'main-golden', will be available in build *200904150201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/6446928ca4d7
User: phejl@netbeans.org
Log: #155021 cannot stop grails app