Hello from a new user...
I've got a couple of instrumented classfiles - the classfiles were made reflective and
are being loaded by JBoss's standard classloader. Their relationship is something like
this (simplified, of course):
public class A {
| private SomeClass x;
| public A() {
| getX().someMethod();
| }
| public SomeClass getX() {
| return x;
| }
| }
|
| public class B extends A {
| }
I'm hitting a NullPointerException in the Metaobject class during construction of an
instance of B. The call stack looks something like this:
| Metaobject.trapMethodcall()
| A._added_m$0()
| A.getX()
| A.<init>
| B.<init>
|
The trapMethodcall() is throwing a NullPointerException because the methods[] array is
not yet initialized - as we would expect during the constructor call. But this breaks
the accessor.
In case it's relevant, I didn't build the classfile by running
javassist.reflect.Compiler, but I copied the compiler's logic - making the class
reflective with Reflection.makeReflective() and Reflection.onLoad(), then writing the
resulting classfiles.
Any insights about what I'm doing wrong?
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839908#3839908
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839908
-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 -
digital self defense, top technical experts, no vendor pitches,
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user