Grails 2.2.1 does not recognize this url mapping

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Grails 2.2.1 does not recognize this url mapping

netwiser
Hi there,

I am using Grails 2.2.1 with JDK 6 update 45 64bit on Ubuntu. 

I have a mapping in UrlMappings like this:

'/sitemap.xml' {
             controller = "company"
             action = "sitemap"
        }

But it throws exception:
Caused by: groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.grails.web.mapping.DefaultUrlMappingEvaluator$UrlMappingBuilder.sitemap.xml() is applicable for argument types: (UrlMappings$__clinit__closure1_closure9) values: [UrlMappings$__clinit__closure1_closure9@2aeaed]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at UrlMappings$__clinit__closure1$$EOBthnUW.doCall(UrlMappings.groovy:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


The same mapping in Grails 1.3.9 works like charm.

Any idea?

Best Regards,

James
Reply | Threaded
Open this post in threaded view
|

Re: Grails 2.2.1 does not recognize this url mapping

Rafael Vargas Rosas
Try adding another mapping:

'/sitemap' {
             controller = "company"
             action = "sitemap"
        }


On Wed, Jul 17, 2013 at 7:38 PM, James Zhang <[hidden email]> wrote:
Hi there,

I am using Grails 2.2.1 with JDK 6 update 45 64bit on Ubuntu. 

I have a mapping in UrlMappings like this:

'/sitemap.xml' {
             controller = "company"
             action = "sitemap"
        }

But it throws exception:
Caused by: groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.grails.web.mapping.DefaultUrlMappingEvaluator$UrlMappingBuilder.sitemap.xml() is applicable for argument types: (UrlMappings$__clinit__closure1_closure9) values: [UrlMappings$__clinit__closure1_closure9@2aeaed]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at UrlMappings$__clinit__closure1$$EOBthnUW.doCall(UrlMappings.groovy:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


The same mapping in Grails 1.3.9 works like charm.

Any idea?

Best Regards,

James


Reply | Threaded
Open this post in threaded view
|

RE: Grails 2.2.1 does not recognize this url mapping

netwiser
Thanks I know your idea does work, but I am curious if I want to add some extension such as .jsf, .xml, .html or what ever, then will be problem.

Regards,

James


From: [hidden email]
Date: Wed, 17 Jul 2013 19:41:49 -0500
To: [hidden email]
Subject: Re: [grails-user] Grails 2.2.1 does not recognize this url mapping

Try adding another mapping:

'/sitemap' {
             controller = "company"
             action = "sitemap"
        }


On Wed, Jul 17, 2013 at 7:38 PM, James Zhang <[hidden email]> wrote:
Hi there,

I am using Grails 2.2.1 with JDK 6 update 45 64bit on Ubuntu. 

I have a mapping in UrlMappings like this:

'/sitemap.xml' {
             controller = "company"
             action = "sitemap"
        }

But it throws exception:
Caused by: groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.grails.web.mapping.DefaultUrlMappingEvaluator$UrlMappingBuilder.sitemap.xml() is applicable for argument types: (UrlMappings$__clinit__closure1_closure9) values: [UrlMappings$__clinit__closure1_closure9@2aeaed]
at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:55)
at org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.callCurrent(PogoMetaClassSite.java:78)
at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:49)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:133)
at org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:141)
at UrlMappings$__clinit__closure1$$EOBthnUW.doCall(UrlMappings.groovy:65)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)


The same mapping in Grails 1.3.9 works like charm.

Any idea?

Best Regards,

James