PDA

View Full Version : Problem Running the GORM for MongoDB screencast example



manngs
Nov 16th, 2010, 06:00 AM
I am getting a problem trying to recreate the example described in this video. I suspect the problem is not related to GORM or MongoDB, it is more basic than that.

I have created the Person and Pet domain and controller classes as described in the video, and started to run the application. When click on the PersonController link, I get the following error message on the screen:

Error 500: Executing action [list] of controller [mongo.demo.PersonController] caused exception: groovy.lang.MissingMethodException: No signature of method: static mongo.demo.Person.list() is applicable for argument types: (org.codehaus.groovy.grails.web.servlet.mvc.Grails ParameterMap) values: [[action:list, controller:person, max:10]] Possible solutions: is(java.lang.Object), wait(), wait(long), with(groovy.lang.Closure), find(groovy.lang.Closure), print(java.io.PrintWriter)
Servlet: grails

It looks like the create Person.list() method has the wrong signature. I have not touched this method myself.

I am using Grails 1.3.3 in STS 2.5.0.

Does anyone have any suggestions about how to fix this?

pledbrook
Nov 16th, 2010, 03:23 PM
Does mongo.demo.Person.list() work, i.e. without arguments? Have you uninstalled the Hibernate plugin?

manngs
Nov 16th, 2010, 05:59 PM
I have found the answer. The MongoDB plugin requires version 1.3.5 of Grails, I was using version 1.3.3. There was a message to this effect in the console, I simply missed it the first time. I have changed to version 1.3.5 and it works.