Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: Grails-Spring-Security-UI 0.1.2
-
Fix Version/s: Grails-Spring-Security-UI 0.2
-
Labels:None
-
Environment:OSX 10.6.6, Java 6, Groovy 1.8.1, Grails 2.0.0 M2
Description
I'm trying to create a basic Grails application that has been secured using Spring Security (Core, ACL and UI plugins) with registration enabled, but I'm hitting issues using Grails 2.0.0M2. I can successfully get all of the app to start and the controller links for login, logout, ACL, register all appear on the front page.
When I attempt to register an account I complete the registration form and click the "Create your account" link or login to an account that is successfully bootstrapped, I get this exception:
| Error 2011-09-09 08:19:47,377 ["http-bio-8080"-exec-5] ERROR errors.GrailsExceptionResolver - IllegalStateException occurred when processing request: [GET] /SecureApp/register/index |
Read and write parameter types are not the same. Stacktrace follows:
Line | Method
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 908 | run in '' |
^ 637 | run . . in java.lang.Thread
Caused by IllegalStateException: Read and write parameter types are not the same
->> 886 | runTask in java.util.concurrent.ThreadPoolExecutor$Worker
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 908 | run in '' |
^ 637 | run . . in java.lang.Thread
I've followed these steps to get to this point:
1. Create Grails Application named "SecureApp"
a. grails create-app SecureApp
2. cd SecureApp
3. Install Spring Security Core and ACL
a. grails install-plugin spring-security-acl
4. Create Spring Security User and Role domain classes, controllers
a. grails s2-quickstart org.example AppUser AppRole
5. Edit AppUser class to add 'email' attribute as required by Spring Security for registration
6. Install Spring Security UI
a. grails install-plugin spring-security-ui
7. Enable registration and forgotten password
8. grails s2ui-override auth
9. Configure Mail plugin
10. Test running the application
a. grails run-app
11. Attempt to register an account-> exception.
I'm not sure what the exact fix was, but I've made several changes fixing other issues for the upcoming v0.2 release and can't reproduce this with the current code.