« Return to Thread: MissingMethodException on GORM dynamic methods for Java domain classes

MissingMethodException on GORM dynamic methods for Java domain classes

by Matt DeHoust :: Rate this Message:

Reply to Author | View in Thread

Hello all,

I am using grails-1.0-RC2-SNAPSHOT (revision 6100). My domain model is implemented in Java and is included as a dependency in the lib folder. The hibernate mapping files, which are also in the jar, are referenced in the hibernate.cfg.xml. All tests pass and the application works great with grails run-app. However, when I package it into a war and deploy it on a JBoss instance, I receive errors indicating that the dynamic methods that are supposed to be supplied by GORM are not in play. For example:

Message: No signature of method: static com.foo.Bar.findByName() is applicable for argument types: (java.lang.String) values: {"hello"}
Caused by: Exception thrown executing org.codehaus.groovy.grails.webflow.engine.builder.ClosureInvokingAction@d2cfcb in state 'init' of flow 'do' -- action execution attributes were 'map[[empty]]'; nested exception is groovy.lang.MissingMethodException: No signature of method: static com.foo.Bar.findByName() is applicable for argument types: (java.lang.String) values: {"hello"}
Class: Bar

Also, I am using webflow as you can see by the error message.

The first release of my application used a Groovy domain model in the grails-app/domain folder and did not use webflow. That release worked in the JBoss environment in which the current release fails.

Does anyone out there know why this might fail? Any pointers would be greatly appreciated.

Thanks,
Matt

 « Return to Thread: MissingMethodException on GORM dynamic methods for Java domain classes