[jboss-user] [Javassist] New message: "Re: cannot access added Field in some cases. Please help."

Arvind K do-not-reply at jboss.com
Thu Feb 4 03:50:55 EST 2010


User development,

A new message was posted in the thread "cannot access added Field in some cases. Please help.":

http://community.jboss.org/message/524088#524088

Author  : Arvind K
Profile : http://community.jboss.org/people/megalodon

Message:
--------------------------------------------------------------
Hello Jaikiran,
 
Thanks for your prompt response. Here are the first 3 lines of the stack trace (after which the part of my code where I access the myInt variable forms the next stack trace element):
 
 javassist.CannotCompileException: [source error] no such field: myInt
 javassist.CtBehavior.insertBefore(CtBehavior.java:721)
 javassist.CtBehavior.insertBefore(CtBehavior.java:681)


Javassist version is 3.11.GA
 
One more thing I'd like to add is that I am getting all the fields in the CtClass using CtClass.getFields() and displaying them sometime before adding the new field and soon after adding the new field and I do see the new integer field 'myInt' added after CtClass.addField() call. However, the next statement is an 'CtMethod.insertBefore()' which throws the above exception. Thanks.
 
-Arvind

--------------------------------------------------------------

To reply to this message visit the message page: http://community.jboss.org/message/524088#524088




More information about the jboss-user mailing list