> >On Tue, Feb 14, 2006 at 12:31:45PM -0800, Dain Sundstrom wrote:
> >>I'm getting an IllegalAccessError when using fastclass to invoke a
> >>method on an instance where the method is inherited from a parent  
> >>class.

I've reproduced the bug. It is caused because the method is actually
defined in a non-public class in another package: the public class
org.springframework.ejb.support.AbstractStatelessSessionBean extends the
non-public class org.springframework.ejb.support.AbstractSessionBean.
IMHO this is kind of weird on Spring's part, but nonetheless it has
exposed a bug in FastClass, which is calling invokevirtual on the
ancestor class instead of the derived class.

The workaround, as you have discovered, is to redefine the method in the
derived class, even if it is just to call super.ejbRemove().

Some other parts of CVS HEAD are in transition now (the
MethodInterceptor startup optimizations) so even after I fix this bug
you'll have to wait a little while. I'll let you know when there is a
new version to test.

Thanks,
Chris

Reply via email to