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

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

  •  29-07-2022
  •  | 
  •  

سؤال

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.

هل كانت مفيدة؟

المحلول

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

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top