Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Grails-Spring-Security-UI 0.1
-
Fix Version/s: Grails-Spring-Security-UI 0.2
-
Labels:None
-
Environment:Grails 1.3.4, spring-security-ui 0.1.1
Description
I'm getting the following exception when attempting to register a new user via RegisterController.index (after running 'grails s2ui-override package registration'):
groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.grails.plugins.springsecurity.ui.RegistrationCode.save() is applicable for argument types: () values: [] Possible solutions: wait(), any(), wait(long), isCase(java.lang.Object), use([Ljava.lang.Object;), sleep(long) at grails.plugins.springsecurity.ui.RegisterController$_closure2.doCall(RegisterController.groovy:53) at grails.plugins.springsecurity.ui.RegisterController$_closure2.call(RegisterController.groovy) at java.lang.Thread.run(Thread.java:619)
The problem only occurs when deploying the application as WAR (e.g. 'grails run-war'), not when running with 'grails run-app'. I get the same error when creating a minimal spring-security-core and spring-security-ui application for testing the issue, so it would seem that other parts of the application are not to blame.
The cause obviously seems to be that the RegistrationCode is not mapped as a domain class (checking this with DomainClassArtefactHandler.isDomainClass() seems to confirm it). However, when trying to create an explicit RegistrationCode domain class, a DuplicateMappingException is thrown. A workaround would probably be to create the class with another name and edit RegistrationController to use that, which I haven't yet tried, but will probably have to.
Same problem here with version 0.1.2 and grails 1.3.5
Maybe we are doing something wrong
Domain class is not mapped from the plugin. The table is also not created in the DB.
Might try explicitly creating a hibernate mapping for it and see what happens