Search for the class in your entire classpath. If you have the same class in
mulitple directories, You get this exception.
Sreenivas R.V.
Stefan Tilkov wrote:
> Check whether both classes (the one the object has and the one you're trying
> to cast it to) have been loaded by the same class loade
Check whether both classes (the one the object has and the one you're trying
to cast it to) have been loaded by the same class loader, e.g. using
YourClass.class.getClassLoader().getClass() and
yourObject.getClass().getClassLoader().getClass().
Stefan