I'm trying to follow the grails tutorial here.
When I create a new controller using create-controller XXX.Card
and modify it to use scaffolding as per the tutorial:
package XXX
class CardController {
def scaffold = Card
}
I get the following exception when I click on XXX.CardController:
org.codehaus.groovy.runtime.InvokerInvocationException: groovy.lang.MissingMethodException: No signature of method: static XXX.Card.list() is applicable for argument types: (org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap) values: [[max:10, action:list, controller:card]]
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54)
at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:121)
at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:54)
at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:342)
Caused by: groovy.lang.MissingMethodException: No signature of method: static XXX.Card.list() is applicable for argument types: (org.codehaus.groovy.grails.web.servlet.mvc.GrailsParameterMap) values: [[max:10, action:list, controller:card]]
at XXX.CardController$_closure2.doCall(script1258397512682.groovy:14)
at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
at XXX.CardController$_closure2.doCall(script1258397512682.groovy)
at com.google.appengine.tools.development.agent.runtime.Runtime.invoke(Runtime.java:100)
... 5 more
I'm using Grails 1.1.1 with the app-engine 0.8.5 and gorm-jpa 0.5 plugins.
What am I doing wrong?
Here's the script I use to reproduce this problem:
rm -rf ~/.grails/1.1.1/projects/XXX
grails create-app XXX
cd XXX
grails install-plugin gorm-jpa
grails install-plugin app-engine # Note: specify JPA when prompted
grails create-domain-class XXX.Card
grails create-controller XXX.Card
cat > grails-app/controllers/XXX/CardController.groovy <<EOF
package XXX
class CardController {
def scaffold = Card
}
EOF
cat > grails-app/domain/XXX/Card.groovy <<EOF
package XXX
class Card {
List emails
static hasMany = [emails:String]
}
EOF
grails app-engine