Groovy/Grails - Unable to Resolve Class

skaz picture skaz · May 29, 2011 · Viewed 42.2k times · Source

I am trying to build a Grails project in STS and am getting many error messages of the form: Groovy:unable to resolve class org.codehaus.groovy.grails.commons.ConfigurationHolder as well as others like Groovy:unable to resolve class org.grails.plugins.springsecurity.service.AuthenticateService . I have Grails 1.3.7 selected in the Project Properties, but I don't see an item for 'Grails Depedencies' like I do when I create a sample project. Is this the problem? How can I add it back in?

Answer

skaz picture skaz · May 29, 2011

I don't know why, but here are the steps I took to solve the problem:

  1. Right click on the project and go to Grails Tools -> Enable Dependency Management
  2. Grails Tools -> Refresh Dependencies. This correctly added the 'Grails Dependencies' library.
  3. I still had plugin errors. I for some reason had to uninstall them and then reinstall them for the project to realize they were there.