[kaffe] IllegalAccessError running CGLib

Alan Tam Tam at SiuLung.com
Thu Jul 8 19:44:20 PDT 2004


Hi,

I got a problem using CGLib with Kaffe.
- CGLib 2.0.2 at http://cglib.sourceforge.net/
- Kaffe Debian unstable 1.1.4.PRE1.1.5-7

I've narrowed down the problem to this test case:

$ cat Test.java
public class Test {
    public static void main(String[] args) {
        net.sf.cglib.reflect.FastClass.create(new Test().getClass());
    }
}
$ javac Test.java
$ java Test
$ kaffe Test
java.lang.IllegalAccessError: 
net/sf/cglib/core/AbstractClassGenerator$Source.<init>
   at net.sf.cglib.reflect.FastClass.create (FastClass.java:46)
   at net.sf.cglib.reflect.FastClass.create (FastClass.java:42)
   at Test.main (Test.java:3)
$

I've looked at the source code of AbstractClassGenerator and it seems 
just creating a new instance of Generator, which is public, and Source 
is protected inside AbstractClassGenerator. However, I am unable to 
isolate the problem in CGLib outside it.

Any clues? Thanks!

-- 
Regards,
Alan





More information about the kaffe mailing list