Upgrading my app from Grails 2.2.1 to Grails 2.3.0 and using Spring Security 1.2.7.3. I have a custom UserDetails object:
https://github.com/jamesward/happytrails/blob/grails2/grails-app/services/happytrails/CustomUserDetails.groovyAnd a custom UserDetailsService:
https://github.com/jamesward/happytrails/blob/grails2/grails-app/services/happytrails/UserDetailsService.groovyWhen logging in, I get the following error:
Error 500: Internal Server Error
URI
/j_spring_security_check
Class
java.lang.NoSuchMethodError
Message
happytrails.User.isEnabled()Z
Around line 46 of grails-app/services/happytrails/UserDetailsService.groovy
43: userDetails = new CustomUserDetails(44: user.username,45: user.password,46: user.enabled,47: !user.accountExpired,48: !user.passwordExpired,49: !user.accountLocked,
Around line 32 of grails-app/services/happytrails/UserDetailsService.groovy
29:30: UserDetails userDetails = null31:32: User.withSession {33:34: User user = User.findWhere(username: _username) as User35:
Trace
Line | Method
->> 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . in java.lang.Thread
Caused by NoSuchMethodError: happytrails.User.isEnabled()Z
->> 46 | doCall in UserDetailsService.groovy
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
| 32 | loadUserByUsername in ''
| 1110 | runWorker in java.util.concurrent.ThreadPoolExecutor
| 603 | run in java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . in java.lang.Thread
Has this API somehow changed with Grails 2.3.0?
Thanks,
Matt
P.S. A diff of my 2.2.1 -> 2.3.0 changes:
https://gist.github.com/mraible/6664775