0

I update the grails from 2.3.11 to 2.5.6 with JDK 1.8.0_281.

It gives the following error: import org.codehaus.groovy.grails.commons.ApplicationHolder as AH

/plugins/spring-security-ui/grails-app/controllers/grails/plugins/springsecurity/ui/RegisterController.groovy: 19: unable to resolve class org.codehaus.groovy.grails.commons.ApplicationHolder
 @ line 19, column 1.
   import org.codehaus.groovy.grails.commons.ApplicationHolder as AH
   ^

I update the plugin to :

compile ":spring-security-core:2.0-RC5"
compile ":spring-security-ui:1.0-RC3"

it shows the warning:

No plugin [spring-security-ui-1.0-RC3] installed, cannot uninstall

and the error above, I am confused when am I making the mistake, any help appreciate.

Shallow
  • 55
  • 5

1 Answers1

1

import org.codehaus.groovy.grails.commons.ApplicationHolder as AH

You are using a plugin version that is not supported with Grails 2.5.6. We removed ApplicationHolder in 2014. The class does not exist in Grails 2.5.6.

Jeff Scott Brown
  • 26,804
  • 2
  • 30
  • 47
  • Hi @Jeff, thank you for quick response, what should I use instead of import org.codehaus.groovy.grails.commons.ApplicationHolder as AH ?? the error show in the class class RegisterController extends AbstractS2UiController {} – Shallow Apr 08 '21 at 12:43
  • "what should I use instead of import org.codehaus.groovy.grails.commons.ApplicationHolder as AH" - What is it that you would like to accomplish? – Jeff Scott Brown Apr 08 '21 at 13:01
  • I am trying to update the existing project to grails 2.5.6 which supported officially with JDK 1.8. when I try to run the project it gives this error: rg.codehaus.groovy.grails.commons.ApplicationHolder as AH so what I do is from build config i increased the version to compile ":spring-security-ui:1.0-RC3" and still shows that error: import org.codehaus.groovy.grails.commons.ApplicationHolder as AH ^. that is the main issue. – Shallow Apr 08 '21 at 13:17