commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Curdt <>
Subject Re: Javaflow - cannot be cast
Date Tue, 15 Jul 2008 08:21:34 GMT
> I am getting:
> java.lang.ClassCastException: my.test.MyRunnable cannot be cast to
> my.test.IRunnable
> 	at my.test.MyRunnable.main(

> I guess it has something to do with class rewriting and thus
> my.test.IRunnable is not possible to cast to rewriten  
> my.test.IRunnable.
> Has anyone any suggestion how to deal with it?

I guess it's more likely to be a class loading problem.

Print out the classloaders involved. That should give you more insights.

Who loaded IRunnable? Who loaded the instance?

  Object o = clz.newInstance();
  IRunnable r = (IRunnable) o;


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message