The McG
The McG

Reputation: 175

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

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.

Upvotes: 0

Views: 568

Answers (1)

The McG
The McG

Reputation: 175

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

Upvotes: 1

Related Questions