java.lang.ClassCastException

后端 未结 6 655
感情败类
感情败类 2020-11-29 07:27

Normally whats the reason to get java.lang.ClassCastException ..? I get the following error in my application

java.lang.ClassCastException: [Lcom.rsa.authag         


        
6条回答
  •  我在风中等你
    2020-11-29 08:05

    @Laurențiu Dascălu's answer explains how / why you get a ClassCastException.

    Your exception message looks rather suspicious to me, but it might help you to know that "[Lcom.rsa.authagent.authapi.realmstat.AUTHw" means that the actual type of the object that you were trying to cast was com.rsa.authagent.authapi.realmstat.AUTHw[]; i.e. it was an array object.

    Normally, the next steps to solving a problem like this are:

    • examining the stacktrace to figure out which line of which class threw the exception,
    • examining the corresponding source code, to see what the expected type, and
    • tracing back to see where the object with the "wrong" type came from.

提交回复
热议问题