I have a Grails app that is pretty vanilla. Domain objects over controllers. Everything runs fine when using locally using run-app or run-war. When I create the WAR file using grails war and deploy to Tomcat 7.0.25 webapps directory, I get the following:
Error 500: Internal Server Error URI/apps2/mriMetricAdjustment/teamResultAdjustment/list Classgroovy.lang.MissingMethodException MessageNo signature of method: com.thrivent.mriAdjustment.domain.TeamResultAdjustment.withCriteria() is applicable for argument types: () values: [] Possible solutions: withCriteria(groovy.lang.Closure), withCriteria(java.util.Map, groovy.lang.Closure), createCriteria()
withCriteria()
is a domain method and this error is on all domain objects. I have tried all manner of clean, refresh dependencies, various environment switches on the war build (as in grails prod war). I've totally blown away the app on Tomcat and redeployed. Nothing. I'm working in the Groovy Grails Tool Suite 3.1.0, Grails 2.1.1. Any help would be greatly appreciated.
Adding stack trace and code where issue gets hit. Same place in each controller:
[2013-04-19 16:51:43.931] sysCorpMRIMetricAdjustments ajp-bio-8018-exec-2 ERROR rg.codehaus.groovy.grails.web.errors.GrailsExceptionResolver - error MissingMethodException occurred when processing request: [GET] /apps2/mriMetricAdjustment/teamResultAdjustment/list No signature of method: com.thrivent.mriAdjustment.domain.TeamResultAdjustment.withCriteria() is applicable for argument types: () values: [] Possible solutions: withCriteria(groovy.lang.Closure), withCriteria(java.util.Map, groovy.lang.Closure), createCriteria(). Stacktrace follows: groovy.lang.MissingMethodException: No signature of method: com.thrivent.mriAdjustment.domain.TeamResultAdjustment.withCriteria() is applicable for argument types: () values: [] Possible solutions: withCriteria(groovy.lang.Closure), withCriteria(java.util.Map, groovy.lang.Closure), createCriteria() at com.thrivent.mriAdjustment.controller.TeamResultAdjustmentController.list(TeamResultAdjustmentController.groovy:34) at grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilter.java:195) at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
def results = TeamResultAdjustment.withCriteria {
and {
like("recordStatusCode", "A")
like ("teamID", "%" + params.tsID + "%")
}
}
Updated with a snippet from the log and stack trace of the error. Is there a Tomcat cache that needs to be cleared?
[2013-04-22 08:42:33.414] sysCorpMRIMetricAdjustments ajp-bio-8018-exec-4 DEBUG >ngframework.beans.factory.support.DefaultListableBeanFactory - debug Returning cached >instance of singleton bean 'grailsApplication' [2013-04-22 08:42:33.432] sysCorpMRIMetricAdjustments ajp-bio-8018-exec-4 DEBUG >ngframework.beans.factory.support.DefaultListableBeanFactory - debug Returning cached >instance of singleton bean 'grailsApplication' [2013-04-22 08:42:33.438] sysCorpMRIMetricAdjustments ajp-bio-8018-exec-4 ERROR >rg.codehaus.groovy.grails.web.errors.GrailsExceptionResolver - error >MissingMethodException occurred when processing request: [GET] /apps2/mriMetricAdjustment>/goalAdjustment/list No signature of method: com.thrivent.mriAdjustment.domain.GoalAdjustment.createCriteria() >is applicable for argument types: () values: [] Possible solutions: createCriteria(). Stacktrace follows: groovy.lang.MissingMethodException: No signature of method: >com.thrivent.mriAdjustment.domain.GoalAdjustment.createCriteria() is applicable for >argument types: () values: [] Possible solutions: createCriteria() at >com.thrivent.mriAdjustment.controller.GoalAdjustmentController.list(GoalAdjustmentController.groovy:33) at >grails.plugin.cache.web.filter.PageFragmentCachingFilter.doFilter(PageFragmentCachingFilte>r.java:195) at grails.plugin.cache.web.filter.AbstractFilter.doFilter(AbstractFilter.java:63) at >java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
` plugins { runtime ":hibernate:$grailsVersion" runtime ":jquery:1.8.0" runtime ":resources:1.1.6"
// Uncomment these (or add new ones) to enable additional resources capabilities
//runtime ":zipped-resources:1.0"
//runtime ":cached-resources:1.0"
//runtime ":yui-minify-resources:0.1.4"
build ":tomcat:$grailsVersion"
//build ":hibernate:$grailsVersion"
runtime ":database-migration:1.1"
compile ':cache:1.0.0'
compile ":grails-ui:1.2.3"
compile ":yui:2.8.2.1"
compile ":bubbling:2.1.4"
compile ":searchable:0.6.4"
compile ":jquery-ui:1.8.24"
compile ":jquery-datatables:1.7.5"
//compile ":hibernate:$grailsVersion"
}`
Last but not least - the catalina logs from when I resinstall the war:
>Apr 22, 2013 11:50:22 AM org.apache.catalina.startup.HostConfig checkResources
>INFO: Undeploying context [/apps2/mriMetricAdjustment]
>Apr 22, 2013 11:50:22 AM org.apache.catalina.startup.HostConfig deployWAR
>INFO: Deploying web application archive /opt/Apache/Tomcat7.0.25/profiles/sysCorpMRIMetricAdjustments/webapps/apps2#mriMetricAdjustment.war
>Apr 22, 2013 11:50:26 AM org.apache.catalina.core.ApplicationContext log
>INFO: Initializing Spring root WebApplicationContext
>Apr 22, 2013 11:50:55 AM org.apache.catalina.core.ApplicationContext log
>INFO: Initializing Spring FrameworkServlet 'grails'
>Apr 22, 2013 11:54:19 AM org.apache.catalina.core.ApplicationContext log
>INFO: Initializing Spring FrameworkServlet 'gsp'
>Apr 22, 2013 11:54:19 AM org.apache.catalina.core.ApplicationContext log
>INFO: GSP servlet initialized
One more update...here are my installed plug-ins:
Plug-ins you currently have installed are listed below:
-------------------------------------------------------------
bubbling 2.1.4 -- Bubbling Library YUI Extension
cache 1.0.0 -- Cache Plugin
database-migration 1.1 -- Grails Database Migration Plugin
grails-ui 1.2.3 -- Grails UI
hibernate 2.1.1 -- Hibernate for Grails
jquery 1.8.0 -- JQuery for Grails
jquery-datatables 1.7.5 -- JQuery DataTables Plugin
jquery-ui 1.8.24 -- jQuery UI resources
resources 1.1.6 -- Resources
searchable 0.6.4 -- Searchable Plugin
tomcat 2.1.1 -- Apache Tomcat plugin for Grails
webxml 1.4.1 -- WebXmlConfig
yui 2.8.2.1 -- Yahoo! User Interface Library (YUI)