views:

84

answers:

1

I had the idea that I would write my GroovyDao as a grails service.

Next I would write a MyJavaService in java and locate it in the java sources dir in my grails app. MyJavaService contains a instance reference to groovyDao for spring injection.

I would wire up in resources.groovy the MyJavaService with a groovyDao = ref("GroovyDao").

Everything starts up fine.

However if I make call to MyJavaService any Domain method like Domain.list() returns a Method not found error.

Any help is appreciated.

A: 

The Dynamic methods are only available in Groovy. Try putting you code in the src/groovy directory.

Also try putting the services in grails-app/services

Hope this helps

Scott Warren