Exception when calling grails run-script: Error creating bean with name 'grailsApplication'

StackOverflow https://stackoverflow.com/questions/19863065

  •  29-07-2022
  •  | 
  •  

Question

After making changes in my grails application, if I try to call 'run-script' I get the following exception:

Error org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsApplication'
...

The extended exception will vary, depending on what changes you've made to the application. This is occurring on grails version 2.3.1.

Was it helpful?

Solution

It turns out that 'run-script' (at least in version 2.3.1 of Grails) does not run 'compile' before it tries to run!

So, the solution is:

grails compile grails run-script myScript.groovy

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top