Return-Path: Delivered-To: apmail-geronimo-dev-archive@www.apache.org Received: (qmail 25050 invoked from network); 15 Feb 2006 02:16:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Feb 2006 02:16:50 -0000 Received: (qmail 12685 invoked by uid 500); 15 Feb 2006 02:16:47 -0000 Delivered-To: apmail-geronimo-dev-archive@geronimo.apache.org Received: (qmail 12630 invoked by uid 500); 15 Feb 2006 02:16:47 -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 Received: (qmail 12619 invoked by uid 99); 15 Feb 2006 02:16:47 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2006 18:16:47 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of jason.dillon@gmail.com designates 64.233.182.196 as permitted sender) Received: from [64.233.182.196] (HELO nproxy.gmail.com) (64.233.182.196) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Feb 2006 18:16:46 -0800 Received: by nproxy.gmail.com with SMTP id c29so537351nfb for ; Tue, 14 Feb 2006 18:16:25 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=TCNqcoyt6njDLCWNs3Pj3UG8arQoNqYTnFs6ze5JJa5bi5nX21EIfV5hR3FVOgiJ/tjvMcEK7w+YMI3TN6xbbaKfr4cly9iF40f7YOJFRPbPCCTGUEvdHSWPMxpvTuPFE1OXg0ocw1QXluZP/riHriRlcmzfPoi/klS09DFX+Ck= Received: by 10.48.163.4 with SMTP id l4mr1575440nfe; Tue, 14 Feb 2006 18:16:24 -0800 (PST) Received: by 10.49.15.18 with HTTP; Tue, 14 Feb 2006 18:16:24 -0800 (PST) Message-ID: <937046e80602141816t78f49631kfc36042ee04b632c@mail.gmail.com> Date: Tue, 14 Feb 2006 18:16:24 -0800 From: Jason Dillon Sender: jason.dillon@gmail.com To: dev@geronimo.apache.org Subject: Re: [cglib-devel] IllegalAccessError in fastclass In-Reply-To: <20060215013257.GH25434@polkadot.sixlegs.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <5784B259-575F-49D8-8179-B539E5DCE425@iq80.com> <20060214211013.GF25434@polkadot.sixlegs.com> <567A5F47-C8AA-409C-B1EF-A7C613E7B761@iq80.com> <20060215013257.GH25434@polkadot.sixlegs.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N 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 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 > >