I am trying to access grailsApplication in groovy class under src/groovy but I get a null pointer exception. I also tried to inject a service into the
grailsApplication
src/groovy
After Grails 2.0, you should use:
def grailsApplication = Holders.grailsApplication