4

i had installed the spring security plugin in my application but now i am getting the below error

unable to resolve class org.codehaus.groovy.grails.commons.ApplicationHolder

  • 1
    What version of Grails are you using and what version of the Spring Security plugin did you install? – Joshua Moore Jul 31 '15 at 16:03
  • i am using grails-2.4.4 and spring-security-core:1.2.7.3 – Gaurav vijayvargiya Jul 31 '15 at 18:13
  • 2
    https://grails.github.io/grails-doc/2.4.3/guide/upgradingFrom23.html The following deprecated classes have been removed from Grails 2.4.x: org.codehaus.groovy.grails.commons.ApplicationHolder If you or any plugins you have installed are using these classes you will get a compilation error. The problem can be rectified by updating to new plugins and using grails.util.Holders instead. – V H Jul 31 '15 at 19:57
  • But vahid that link shows step of upgradation from 2.3.x to 2.4. but i am already using grails-2.4.4 version – Gaurav vijayvargiya Aug 01 '15 at 06:50

2 Answers2

5

Vahid is right..

try to change your grailsApplication to Holders.grailsApplication and one more thing.. pluginManager to Holders.pluginManager

It should work!

Kenneth P.
  • 53
  • 4
2

i got the problem: i just uninstalled the old version of spring plugin which i was using(spring-security-core:1.2.7.3)

then i fire these 2 command:

grails clean

grails refresh-dependencies

Then i installed the spring-security-core:2.0-RC5 plugin

that worked