Normally whats the reason to get java.lang.ClassCastException ..? I get the following error in my application
java.lang.ClassCastException: [Lcom.rsa.authag
ClassA a = ; ClassB b = (ClassB) a;
The 2nd line will fail if ClassA is not a subclass of ClassB, and will throw a ClassCastException.