Grails MissingMethodException: createCriteria in WAR, Runs Locally -


i have grails app pretty vanilla. domain objects on controllers. runs fine when using locally using run-app or run-war. when create war file using grails war , deploy tomcat 7.0.25 webapps directory, following:

error 500: internal server error uri/apps2/mrimetricadjustment/teamresultadjustment/list classgroovy.lang.missingmethodexception messageno signature of method: com.thrivent.mriadjustment.domain.teamresultadjustment.withcriteria() applicable argument types: () values: [] possible solutions: withcriteria(groovy.lang.closure), withcriteria(java.util.map, groovy.lang.closure), createcriteria()

withcriteria() domain method , error on domain objects. have tried manner of clean, refresh dependencies, various environment switches on war build (as in grails prod war). i've totally blown away app on tomcat , redeployed. nothing. i'm working in groovy grails tool suite 3.1.0, grails 2.1.1. appreciated.

adding stack trace , code 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() applicable 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() applicable argument types: () values: [] possible solutions: withcriteria(groovy.lang.closure), withcriteria(java.util.map, groovy.lang.closure), createcriteria() @ com.thrivent.mriadjustment.controller.teamresultadjustmentcontroller.list(teamresultadjustmentcontroller.groovy:34) @ grails.plugin.cache.web.filter.pagefragmentcachingfilter.dofilter(pagefragmentcachingfilter.java:195) @ grails.plugin.cache.web.filter.abstractfilter.dofilter(abstractfilter.java:63) @ java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886) @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908) @ java.lang.thread.run(thread.java:662)

def results = teamresultadjustment.withcriteria { , { like("recordstatuscode", "a") ("teamid", "%" + params.tsid + "%") } }

updated snippet log , stack trace of error. there tomcat cache needs 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 argument types: () values: [] possible solutions: createcriteria(). stacktrace follows: groovy.lang.missingmethodexception: no signature of method: >com.thrivent.mriadjustment.domain.goaladjustment.createcriteria() applicable >argument types: () values: [] possible solutions: createcriteria() @ >com.thrivent.mriadjustment.controller.goaladjustmentcontroller.list(goaladjustmentcontroller.groovy:33) @ >grails.plugin.cache.web.filter.pagefragmentcachingfilter.dofilter(pagefragmentcachingfilte>r.java:195) @ grails.plugin.cache.web.filter.abstractfilter.dofilter(abstractfilter.java:63) @ >java.util.concurrent.threadpoolexecutor$worker.runtask(threadpoolexecutor.java:886)> @ java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:908) @ 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) 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 not least - catalina logs when resinstall war:

>apr 22, 2013 11:50:22 org.apache.catalina.startup.hostconfig checkresources >info: undeploying context [/apps2/mrimetricadjustment] >apr 22, 2013 11:50:22 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 org.apache.catalina.core.applicationcontext log >info: initializing spring root webapplicationcontext >apr 22, 2013 11:50:55 org.apache.catalina.core.applicationcontext log >info: initializing spring frameworkservlet 'grails' >apr 22, 2013 11:54:19 org.apache.catalina.core.applicationcontext log >info: initializing spring frameworkservlet 'gsp' >apr 22, 2013 11:54:19 org.apache.catalina.core.applicationcontext log >info: gsp servlet initialized 

one more update...here installed plug-ins:

plug-ins have installed 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 grails jquery              1.8.0            --  jquery 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 grails webxml              1.4.1            --  webxmlconfig yui                 2.8.2.1          --  yahoo! user interface library (yui) 

please share code domain , controller. worked me without exception.

steps:

  • created demoapp
  • created domain
  • created controller
  • used withcriteria index() action
  • grails war
  • deployed war tomcat 7.0.39 (latest)

you can find details here.

url hit:

http://localhost:8080/demoapp-0.1/foo?name=foo 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -