Thursday, 6 March 2008

mappings closure does not exists for class UrlMappings

I've just started working on a new grails application, and early in the piece I hit this error:
2008-03-05 18:39:20.715::WARN: Failed startup of context org.mortbay.jetty.webapp.WebAppContext@1fcb845{/jtchat,/home/prule/workspace/jtchat/web-app}
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.codehaus.groovy.grails.plugins.web.taglib.ApplicationTagLib': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsUrlMappingsHolder': Cannot resolve reference to bean 'urlMappingsTargetSource' while setting bean property 'targetSource'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'urlMappingsTargetSource': Cannot resolve reference to bean 'grailsUrlMappingsHolderBean' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'grailsUrlMappingsHolderBean': Invocation of init method failed; nested exception is java.lang.RuntimeException: mappings closure does not exists for class UrlMappings

I'd not done much except for adding a domain class, controller, view and a test. Certainly I hadn't done anything with UrlMappings. I did have a failure installing a plugin (the converter plugin which apparently is not needed anymore?), and I am editing the project in Eclipse with the Groovy plugin.

I've no idea what caused it, but doing a 'grails clean' resolved it.