Ambiguous method overload for grails.spring.BeanBuilder # registerBeans method

I follow the brilliant videos of Mike Kelly, but I was shocked by the next problem. This happens when I add a new domain class. I tried to roll back the changes and add a DomainClass with a different name, restart the IDE, etc. With only one domain class, I have no error, if I add, an error will appear.

I work with ggts 3.4.0, Grail 2.3.1, JDK 1.7.0_45.

| Error 2013-11-04 21:56:37,442 [Thread-8] ERROR plugins.AbstractGrailsPluginManager - Plugin [domainClass:2.3.1] could not reload changes to file [C:\Grails\ProjectTracker\grails-app\domain\projecttracker\EndUser.groovy]: Ambiguous method overloading for method grails.spring.BeanBuilder#registerBeans. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration] [interface org.springframework.beans.factory.support.BeanDefinitionRegistry] Message: Ambiguous method overloading for method grails.spring.BeanBuilder#registerBeans. Cannot resolve which method to invoke for [null] due to overlapping prototypes between: [interface org.codehaus.groovy.grails.commons.spring.RuntimeSpringConfiguration] [interface org.springframework.beans.factory.support.BeanDefinitionRegistry] Line | Method ->> 2980 | chooseMostSpecificParams in groovy.lang.MetaClassImpl 
+8
grails
source share
3 answers

This is mistake. I was able to reproduce the problem when I researched http://jira.grails.org/browse/GRAILS-10735 .

+2
source share

You can override the ambiguous method when passing null to its parameter

 MyClass.metaClass.myAmbiguousMethod = {def param -> if(param != null){ myAmbiguousMethod(param) } else{ null } } 
0
source share

I can reproduce this in grails 3.2.4 by providing the render invalidVariable . A bad render argument can lead to what I can say

-one
source share

All Articles