geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jason Dillon <ja...@planet57.com>
Subject Re: [cglib-devel] IllegalAccessError in fastclass
Date Wed, 15 Feb 2006 02:16:24 GMT
Weird... I did not notice that
org.springframework.ejb.support.AbstractSessionBean was package
private.  It makes a little sense that is is package private because
you only expect users to extend from one of its direct subclasses for
MDB or a SB.

Thanks for taking a look :-)

I've added definitions for ejbRemove() which call super.ejbRemove() to
get around this.  Do you know when the fix will make it into a CGLIB
release that would be usable by G?

--jason


On 2/14/06, Chris Nokleberg <chris@sixlegs.com> wrote:
> > >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
>
>

Mime
View raw message