2

I'm setting up a Grails development environment using Eclipse (on Windows) and I've noticed that after the sample app starts running (not debugging, just running), no matter what I do I can't terminate the running app. I've tried the obvious red square (on the console window and on the debug view). I've also tried running "stop-app" from the grails command window. But the app still continues to run. Is this a known issue? Is there a fix for it?

Not sure if this matter, but the only thing that I did in Eclipse other than installing the Groovy/Grails plugin is to also install support for the Groovy 2.1 compiler.

Harry Muscle
  • 2,247
  • 4
  • 38
  • 62
  • What version of Grails? – Burt Beckwith Jan 17 '14 at 17:58
  • I'm using version 2.3.5 – Harry Muscle Jan 17 '14 at 18:27
  • Bunch of guys at work have the same problem... Cannot stop it with Ctrl+c from command line. Works fine on a Mac. – zoran119 Jan 18 '14 at 10:05
  • possible duplicate of [Grails 2.3 & GGTS 3.4 stop button not working](http://stackoverflow.com/questions/19876358/grails-2-3-ggts-3-4-stop-button-not-working) – john Jan 22 '14 at 11:28
  • I have the same problem with Grails 2.3.6 and GGTS (bascially Eclipse). I cant stop an app once it has started, even if that app is a hello world project with one line. i have to exit GGTS, then kill the JVM which is left running, the restart GGTS, the process takes several minutes, and means that developing using GRAILS is not feasible, as I am losing an hour a day just killing the JVM (windows 7 pro 64 bit, jdk 1.7 – John Little Mar 02 '14 at 23:56

1 Answers1

1

Everything in 2.3 is forked by default, so there's one JVM that you start, and it has the Ant jars and other stuff that's needed to start Grails, but that pollutes the JVM unnecessarily. The 2nd JVM that the first process starts is lighter-weight with only the jars that the app depends on, i.e. the Grails, Spring, Hibernate, etc. jars. But this is a tricky thing to do, and unfortunately Windows doesn't get much testing during development because the Grails developers get to choose which OS to use (unlike a lot of Grails users who often have Windows forced on them) and Windows is not chosen - it's all Mac and Linux.

I haven't followed this closely because it was quite buggy early on and I'm now in the habit of just disabling forking any time I create an app. There's probably a better approach, but I delete the grails.project.fork property from BuildConfig.groovy. You can comment it out, or disable forking for a particular launch type ("run", "test", etc.) but deleting the whole block disables it across the board and I find that things work well after that.

Burt Beckwith
  • 75,342
  • 5
  • 143
  • 156