Scaffolded create view results in: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass)

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Scaffolded create view results in: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass)

cloudwalker84
I'm using version 1.0.0 of the scaffolding plugin so it should be compatible with our old templates (recently upgraded from Grails 1.3.7 to 2.3.4). However, when accessing a scaffolded create view I end up with:

Caused by: org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error executing tag <g:render>: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass) values: [Artefact > LineOfBusiness]
Possible solutions: getMapping(java.lang.Class), getMapping(org.codehaus.groovy.grails.commons.GrailsDomainClass)
        at org.codehaus.groovy.grails.web.pages.GroovyPage.throwRootCause(GroovyPage.java:530)
        at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:473)
        at sun.reflect.GeneratedMethodAccessor1335.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:990)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
        at lineOfBusiness_create$_run_closure17.doCall(create:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.Closure.call(Closure.java:411)
        at groovy.lang.Closure.call(Closure.java:405)
        at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.executeClosure(GroovyPageTagBody.java:206)
        at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.captureClosureOutput(GroovyPageTagBody.java:108)
        at org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.call(GroovyPageTagBody.java:219)
        at java_util_concurrent_Callable$call.call(Unknown Source)
        at org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib$_closure9.doCall(FormTagLib.groovy:425)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.Closure.call(Closure.java:411)
        at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTagLibClosure(GroovyPage.java:504)
        at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:422)
        ... 65 more
Caused by: groovy.lang.MissingMethodException: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass) values: [Artefact > LineOfBusiness]
Possible solutions: getMapping(java.lang.Class), getMapping(org.codehaus.groovy.grails.commons.GrailsDomainClass)
        at groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1374)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1360)
        at groovy.lang.ExpandoMetaClass.invokeStaticMethod(ExpandoMetaClass.java:1123)
        at org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50)
        at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at SimpleTemplateScript62.run(SimpleTemplateScript62.groovy:8)
        at groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:165)
        at org.codehaus.groovy.grails.scaffolding.AbstractGrailsTemplateGenerator.generate(AbstractGrailsTemplateGenerator.java:218)
        at org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator.generate(DefaultGrailsTemplateGenerator.groovy)
        at org.codehaus.groovy.grails.scaffolding.AbstractGrailsTemplateGenerator.generateView(AbstractGrailsTemplateGenerator.java:142)
        at org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator.generateView(DefaultGrailsTemplateGenerator.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
        at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.generateScaffoldedTemplate(GroovyPagesTemplateRenderer.java:242)
        at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.findAndCacheTemplate(GroovyPagesTemplateRenderer.java:144)
        at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.render(GroovyPagesTemplateRenderer.java:97)
        at org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer$render.call(Unknown Source)
        at org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib$_closure10.doCall(RenderTagLib.groovy:598)
        at sun.reflect.GeneratedMethodAccessor791.invoke(Unknown Source)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.Closure.call(Closure.java:411)
        at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTagLibClosure(GroovyPage.java:504)
        at org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:422)
        ... 109 more

How do I fix this?
Reply | Threaded
Open this post in threaded view
|

Re: Scaffolded create view results in: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass)

Juan Coello
I had the same problem with the 2.0 plugin version; we needed to update our scaffolding templates to be compatible with those in the plugin (link)

Nevertheless, not sure whether you can use Grails 2.3.X with Scaffolding 1.0. 

More info here.

 


On Mon, Mar 24, 2014 at 2:41 PM, cloudwalker84 <[hidden email]> wrote:
I'm using version 1.0.0 of the scaffolding plugin so it should be compatible
with our old templates (recently upgraded from Grails 1.3.7 to 2.3.4).
However, when accessing a scaffolded create view I end up with:

Caused by:
org.codehaus.groovy.grails.web.taglib.exceptions.GrailsTagException: Error
executing tag <g:render>: No signature of method: static
org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping()
is applicable for argument types:
(org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass) values:
[Artefact > LineOfBusiness]
Possible solutions: getMapping(java.lang.Class),
getMapping(org.codehaus.groovy.grails.commons.GrailsDomainClass)
        at
org.codehaus.groovy.grails.web.pages.GroovyPage.throwRootCause(GroovyPage.java:530)
        at
org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:473)
        at sun.reflect.GeneratedMethodAccessor1335.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:990)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at
org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:66)
        at lineOfBusiness_create$_run_closure17.doCall(create:31)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.Closure.call(Closure.java:411)
        at groovy.lang.Closure.call(Closure.java:405)
        at
org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.executeClosure(GroovyPageTagBody.java:206)
        at
org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.captureClosureOutput(GroovyPageTagBody.java:108)
        at
org.codehaus.groovy.grails.web.taglib.GroovyPageTagBody.call(GroovyPageTagBody.java:219)
        at java_util_concurrent_Callable$call.call(Unknown Source)
        at
org.codehaus.groovy.grails.plugins.web.taglib.FormTagLib$_closure9.doCall(FormTagLib.groovy:425)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.Closure.call(Closure.java:411)
        at
org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTagLibClosure(GroovyPage.java:504)
        at
org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:422)
        ... 65 more
Caused by: groovy.lang.MissingMethodException: No signature of method:
static
org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping()
is applicable for argument types:
(org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass) values:
[Artefact > LineOfBusiness]
Possible solutions: getMapping(java.lang.Class),
getMapping(org.codehaus.groovy.grails.commons.GrailsDomainClass)
        at
groovy.lang.MetaClassImpl.invokeStaticMissingMethod(MetaClassImpl.java:1374)
        at groovy.lang.MetaClassImpl.invokeStaticMethod(MetaClassImpl.java:1360)
        at
groovy.lang.ExpandoMetaClass.invokeStaticMethod(ExpandoMetaClass.java:1123)
        at
org.codehaus.groovy.runtime.callsite.StaticMetaClassSite.call(StaticMetaClassSite.java:50)
        at
org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:45)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)
        at
org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
        at SimpleTemplateScript62.run(SimpleTemplateScript62.groovy:8)
        at
groovy.text.SimpleTemplateEngine$SimpleTemplate$1.writeTo(SimpleTemplateEngine.java:165)
        at
org.codehaus.groovy.grails.scaffolding.AbstractGrailsTemplateGenerator.generate(AbstractGrailsTemplateGenerator.java:218)
        at
org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator.generate(DefaultGrailsTemplateGenerator.groovy)
        at
org.codehaus.groovy.grails.scaffolding.AbstractGrailsTemplateGenerator.generateView(AbstractGrailsTemplateGenerator.java:142)
        at
org.codehaus.groovy.grails.scaffolding.DefaultGrailsTemplateGenerator.generateView(DefaultGrailsTemplateGenerator.groovy)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at
org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:191)
        at
org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.generateScaffoldedTemplate(GroovyPagesTemplateRenderer.java:242)
        at
org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.findAndCacheTemplate(GroovyPagesTemplateRenderer.java:144)
        at
org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer.render(GroovyPagesTemplateRenderer.java:97)
        at
org.codehaus.groovy.grails.web.pages.GroovyPagesTemplateRenderer$render.call(Unknown
Source)
        at
org.codehaus.groovy.grails.plugins.web.taglib.RenderTagLib$_closure10.doCall(RenderTagLib.groovy:598)
        at sun.reflect.GeneratedMethodAccessor791.invoke(Unknown Source)
        at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at
org.springsource.loaded.ri.ReflectiveInterceptor.jlrMethodInvoke(ReflectiveInterceptor.java:1254)
        at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:90)
        at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:233)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1086)
        at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1110)
        at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:910)
        at groovy.lang.Closure.call(Closure.java:411)
        at
org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTagLibClosure(GroovyPage.java:504)
        at
org.codehaus.groovy.grails.web.pages.GroovyPage.invokeTag(GroovyPage.java:422)
        ... 109 more

How do I fix this?



--
View this message in context: http://grails.1312388.n4.nabble.com/Scaffolded-create-view-results-in-No-signature-of-method-static-org-codehaus-groovy-grails-orm-hiber-tp4655372.html
Sent from the Grails - user mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: Scaffolded create view results in: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass)

cloudwalker84
We don't have any existing templates (we never ran the install-templates command), but when I use version 2.x of the scaffolding plugin everything gets messed up because for some controllers we override some specific templates and it looks like in the older version of Grails, when going to the index action it was using the list.gsp template where it now uses the index.gsp template.

I read somewhere that to get around this and to be backwards compatible with the old style scaffolding stuff, just use version 1.0.0 of the scaffolding plugin. This seems to work fine other than create/edit - that's when we get that exception.
Reply | Threaded
Open this post in threaded view
|

Re: Scaffolded create view results in: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass)

cloudwalker84
Anyone have any ideas on this one? I don't want to have to go through and update all of our existing overridden templates since there are a ton. It seems that I should be able to get the legacy scaffolding stuff where it uses list as the default action rather than index, etc. to work on grails 2.x.
Reply | Threaded
Open this post in threaded view
|

Re: Scaffolded create view results in: No signature of method: static org.codehaus.groovy.grails.orm.hibernate.cfg.GrailsDomainBinder.getMapping() is applicable for argument types: (org.codehaus.groovy.grails.commons.DefaultGrailsDomainClass)

burtbeckwith
When the Hibernate plugin was refactored, the methods in GrailsDomainBinder were changed from static to instance methods. The class is stateless, so the fix is to create a new instance and call the methods on that. Grep for GrailsDomainBinder.getMapping() and change it to "new GrailsDomainBinder().getMapping()"

Burt

cloudwalker84 wrote
Anyone have any ideas on this one? I don't want to have to go through and update all of our existing overridden templates since there are a ton. It seems that I should be able to get the legacy scaffolding stuff where it uses list as the default action rather than index, etc. to work on grails 2.x.