org.springframework.security.authentication.InternalAuthenticationServiceException: Cannot cast object 'User(email:user@example.com)' with class 'com.test.User' to class 'com.test.User'

tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    User authentication failing after upgrading to 3.2.1

    Stack Overflow | 6 months ago | Shashank Agrawal
    org.springframework.security.authentication.InternalAuthenticationServiceException: Cannot cast object 'User(email:user@example.com)' with class 'com.test.User' to class 'com.test.User'
  2. 0

    GroovyCastException when both @CompileStatic and @Newify are used

    Stack Overflow | 1 year ago | Ziphil
    org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'main.Test@543e710e' with class 'main.Test' to class 'main.A'
  3. 0

    GroovyCastException when using http client 4.4/4.5 APIs

    GitHub | 11 months ago | sslavic
    org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.http.impl.client.InternalHttpClient@6622a690' with class 'org.apache.http.impl.client.InternalHttpClient' to class 'org.apache.http.impl.client.AbstractHttpClient'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Not able to start in tomcat 7

    GitHub | 8 months ago | jenshp
    org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object 'org.apache.tomcat.websocket.server.WsServerContainer@1344f181' with class 'org.apache.tomcat.websocket.server.WsServerContainer' to class 'javax.websocket.server.ServerContainer'
  6. 0

    Cannot cast object '[Digest Input Stream] MD5 Message Digest from SUN, <initialized>

    GitHub | 5 months ago | hzhlu
    org.codehaus.groovy.runtime.typehandling.GroovyCastException: Cannot cast object '[Digest Input Stream] MD5 Message Digest from SUN, <initialized> ' with class 'java.security.DigestInputStream' to class 'java.io.ByteArrayInputStream'

  1. johnxfly 2 times, last 2 weeks ago
  2. derprogger 2 times, last 3 weeks ago
  3. jesse 2 times, last 1 month ago
  4. musketyr 1 times, last 2 months ago
  5. serious2monkeys 3 times, last 5 months ago
2 more registered users
8 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. 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()
  2. Groovy
    ScriptBytecodeAdapter.castToType
    1. org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnSAM(DefaultTypeTransformation.java:405)
    2. org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.continueCastOnNumber(DefaultTypeTransformation.java:319)
    3. org.codehaus.groovy.runtime.typehandling.DefaultTypeTransformation.castToType(DefaultTypeTransformation.java:232)
    4. org.codehaus.groovy.runtime.ScriptBytecodeAdapter.castToType(ScriptBytecodeAdapter.java:603)
    4 frames
  3. com.test
    User$findWhere.call
    1. com.test.User.findWhere(User.groovy)
    2. com.test.User$findWhere.call(Unknown Source)
    2 frames
  4. grails.plugin.springsecurity
    GormUserDetailsService$_loadUserByUsername_closure1.doCall
    1. grails.plugin.springsecurity.userdetails.GormUserDetailsService.$tt__loadUserByUsername(GormUserDetailsService.groovy:60)
    2. grails.plugin.springsecurity.userdetails.GormUserDetailsService$_loadUserByUsername_closure1.doCall(GormUserDetailsService.groovy)
    2 frames