B
Bryan Kennedy
I'm currently working on a project using BCEL to instrument classes as
they are loaded. I'm running into the following exception (stack
trace at the bottom of this post):
Exception in thread "main" java.lang.IllegalAccessError: class
sun.reflect.GeneratedSerializationConstructorAccessor1 cannot
access its superclass
sun.reflect.SerializationConstructorAccessorImpl
This error seems totally bizzare to me, since it looks like
MethodAccessGenerator is generating a bogus class. Some googling
around finds other people who have had this problem when using
programs like cactus, but I can't find anywhere that talks about how
those errors were resolved. Does anybody know what causes the bowels
of the sun.reflect API to generate a bogus class like this?
thanks for any help or pointers to resources that I missed.
--bk
a more full stack trace:
Exception in thread "main" java.lang.IllegalAccessError: class
sun.reflect.GeneratedSerializationConstructorAccessor1 cannot access
its superclass sun.reflect.SerializationConstructorAccessorImpl
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
at
sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator
.java:381)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator
.java:377)
at
sun.reflect.MethodAccessorGenerator.generateSerializationConstructor
(MethodAccessorGenerator.java:95)
at
sun.reflect.ReflectionFactory.newConstructorForSerialization
(ReflectionFactory.java:301)
at
java.ibjectStreamClass.getSerializableConstructor
(ObjectStreamClass.java:1177)
at
java.ibjectStreamClass.access$1100(ObjectStreamClass.java:45)
at java.ibjectStreamClass$3.run(ObjectStreamClass.java:343)
at java.security.AccessController.doPrivileged(Native Method)
at
java.ibjectStreamClass.<init>(ObjectStreamClass.java:329)
at
java.ibjectStreamClass.lookup(ObjectStreamClass.java:249)
at
java.ibjectOutputStream.writeObject0(ObjectOutputStream.java:1010)
at
java.ibjectOutputStream.writeObject(ObjectOutputStream.java:278)
....
they are loaded. I'm running into the following exception (stack
trace at the bottom of this post):
Exception in thread "main" java.lang.IllegalAccessError: class
sun.reflect.GeneratedSerializationConstructorAccessor1 cannot
access its superclass
sun.reflect.SerializationConstructorAccessorImpl
This error seems totally bizzare to me, since it looks like
MethodAccessGenerator is generating a bogus class. Some googling
around finds other people who have had this problem when using
programs like cactus, but I can't find anywhere that talks about how
those errors were resolved. Does anybody know what causes the bowels
of the sun.reflect API to generate a bogus class like this?
thanks for any help or pointers to resources that I missed.
--bk
a more full stack trace:
Exception in thread "main" java.lang.IllegalAccessError: class
sun.reflect.GeneratedSerializationConstructorAccessor1 cannot access
its superclass sun.reflect.SerializationConstructorAccessorImpl
at sun.misc.Unsafe.defineClass(Native Method)
at sun.reflect.ClassDefiner.defineClass(ClassDefiner.java:45)
at
sun.reflect.MethodAccessorGenerator$1.run(MethodAccessorGenerator
.java:381)
at java.security.AccessController.doPrivileged(Native Method)
at
sun.reflect.MethodAccessorGenerator.generate(MethodAccessorGenerator
.java:377)
at
sun.reflect.MethodAccessorGenerator.generateSerializationConstructor
(MethodAccessorGenerator.java:95)
at
sun.reflect.ReflectionFactory.newConstructorForSerialization
(ReflectionFactory.java:301)
at
java.ibjectStreamClass.getSerializableConstructor
(ObjectStreamClass.java:1177)
at
java.ibjectStreamClass.access$1100(ObjectStreamClass.java:45)
at java.ibjectStreamClass$3.run(ObjectStreamClass.java:343)
at java.security.AccessController.doPrivileged(Native Method)
at
java.ibjectStreamClass.<init>(ObjectStreamClass.java:329)
at
java.ibjectStreamClass.lookup(ObjectStreamClass.java:249)
at
java.ibjectOutputStream.writeObject0(ObjectOutputStream.java:1010)
at
java.ibjectOutputStream.writeObject(ObjectOutputStream.java:278)
....