5

Everytime I run the grails application using

run-app

It runs fine but if I stop it using

stop-app

Then it stops but gives me the following error if i try to run it again or execute any other commands

 error executing script runapp _grailsclasspath_groovy$_run_closure1

I have to delete all files manually from target>work>scriptCache for things to work again everytime. Is there any misconfig? I also tried clean after stopping application but it does not help

Nikhil
  • 1,166
  • 2
  • 17
  • 35

3 Answers3

0

If you run clean in interactive mode it can lead to this error

Graeme Rocher
  • 7,985
  • 2
  • 26
  • 37
0

I am assuming you faced this in Eclipse environment. I too was facing the same.

This worked for me:

  1. Delete target folder

  2. Delete contents of .grails folder

  3. Executing run-app from command prompt instead of through eclipse plugin.

codependent
  • 23,193
  • 31
  • 166
  • 308
Vinay
  • 77
  • 2
  • 13
0
  1. Delete the .grails folder (under the user home folder)
  2. Delete the target folder (under the project folder)
  3. Run clean
  4. Run run-app

Example:

rm -rf ~/.grails/               # 1.
rm -rf <path to project>/target # 2.
grails clean                    # 3.
grails run-app                  # 4.

Reference: grails-2-3-0-not-running.

Maicon Mauricio
  • 2,052
  • 1
  • 13
  • 29