Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Blocker
-
Resolution: Won't Fix
-
Affects Version/s: 1.2-RC2
-
Fix Version/s: 1.2 final
-
Component/s: Controllers
-
Labels:None
-
Environment:Windows XP
Description
There are data inconsistencies in our historical database, so the users have asked us to display errors when edit.gsp is loaded. The page is backed by a command object declared at the bottom of the controller class file. The command object is annotated with @Validateable. Within the edit closure we have
accountDetailsCommand.errors.rejectValue('username','username.format')
This line generates an exception in Grails 1.2.0.RC2 - "Cannot invoke method rejectValue() on null object"
In Grails 1.1.1 and 1.1.2 this error sometimes occurred on hot-reload, but it never happened once the application was running.
I haven't investigated the real cause of this yet but why are you marking a command object as @Validateable? Command objects are made validateable by default.