Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 14774 invoked from network); 15 Feb 2006 01:39:13 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Feb 2006 01:39:13 -0000 Received: (qmail 73708 invoked by uid 500); 15 Feb 2006 01:39:12 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 73010 invoked by uid 500); 15 Feb 2006 01:39:10 -0000 Mailing-List: contact dev-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list dev@geronimo.apache.org Delivered-To: moderator for dev@geronimo.apache.org Received: (qmail 63240 invoked by uid 99); 15 Feb 2006 01:32:29 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Date: Tue, 14 Feb 2006 17:32:57 -0800 From: Chris Nokleberg To: cglib-devel@lists.sourceforge.net Cc: dev@geronimo.apache.org Subject: Re: [cglib-devel] IllegalAccessError in fastclass Message-ID: <20060215013257.GH25434@polkadot.sixlegs.com> References: <5784B259-575F-49D8-8179-B539E5DCE425@iq80.com> <20060214211013.GF25434@polkadot.sixlegs.com> <567A5F47-C8AA-409C-B1EF-A7C613E7B761@iq80.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <567A5F47-C8AA-409C-B1EF-A7C613E7B761@iq80.com> X-Face: "Y3=wB%rbO-.>w\AACMy!\VHWOC%Vt5cUv9>/6MF"uiS"(G`*Y@?j#~V_J1D<=:#'Zm{@A~nD`sBK=zwf.}NJLtj88h4j*dq3iVSrgE[@2vXEH]>($R)c6t{2u#MsZB&hU~5ab7>F0Wu%Q`ZSd:[} User-Agent: Mutt/1.5.11 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N > >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