org.springframework.security.authentication.InternalAuthenticationServiceException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Not able to start in tomcat 7
    via GitHub by jenshp
    ,
  • GitHub comment 783#270628410
    via GitHub by kmakowski
    ,
  • GitHub comment 340#259598197
    via GitHub by doracl
    ,
  • Why is this Groovy code trying to cast?
    via Stack Overflow by tinny
    ,
  • groovy "with" block usage query
    via Stack Overflow by Abe
    ,
    • org.springframework.security.authentication.InternalAuthenticationServiceException: Cannot cast object 'User(email:user@example.com)' with class 'com.test.User' to class 'com.test.User' at org.springframework.security.authentication.dao.DaoAuthenticationProvider.retrieveUser(DaoAuthenticationProvider.java:126) at org.springframework.security.authentication.dao.AbstractUserDetailsAuthenticationProvider.authenticate(AbstractUserDetailsAuthenticationProvider.java:144) at org.springframework.security.authentication.ProviderManager.authenticate(ProviderManager.java:174) at org.springframework.security.web.authentication.UsernamePasswordAuthenticationFilter.attemptAuthentication(UsernamePasswordAuthenticationFilter.java:94) at grails.plugin.springsecurity.web.authentication.GrailsUsernamePasswordAuthenticationFilter.attemptAuthentication(GrailsUsernamePasswordAuthenticationFilter.groovy:53) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:212) Caused by: org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'User(email:user@example.com)' with class 'com.test.User' to class 'com.test.User' at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:405) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:319) at org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:232) at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:603) at com.test.User.findWhere(User.groovy) at com.test.User$findWhere.call(Unknown Source) at grails.plugin.springsecurity.userdetails.GormUserDetailsService.$tt__loadUserByUsername(GormUserDetailsService.groovy:60) at grails.plugin.springsecurity.userdetails.GormUserDetailsService$_loadUserByUsername_closure1.doCall(GormUserDetailsService.groovy)

    Users with the same issue

    musketyr
    11 times, last one,
    derprogger
    1 times, last one,
    johnxfly
    2 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    15 more bugmates