Gregg Bolinger wrote:Basically, for some reason, when Message(params) does it's stuff, it is trying to get a TechEvent using 2 String parameters. The get method in GORM usually accepts an Integer which would be the ID of the object you need or an Object, but not a String, and not 2 Strings...
The issue was a hidden field in a form within my gsp, which duplicated an active field; thus upon submission it would send two arguments for the same parameter. I removed the hidden field and it now
almost works. While I am now able to create a "new" message, when I try to "reply" I get the following error, which seems to be a
grails bug:
Error 500: java.lang.ClassCastException: TechEvent$__clinit__closure1 cannot be cast to java.util.Map
Servlet: grails
URI: /TechDays/grails/message/save.dispatch
Exception Message: TechEvent$__clinit__closure1 cannot be cast to java.util.Map
Caused by: java.lang.ClassCastException: TechEvent$__clinit__closure1 cannot be cast to java.util.Map
Class: MessageController
At Line: [100]
Code Snippet:
99: def save = {
100: def messageInstance = new Message(params)
101: if(!messageInstance.hasErrors() && messageInstance.save()) {