BCEL instrumentation -> ClassFormatError
Marwa_mma73 <[email protected]> Thu, 27 Mar 2008 08:35:56 -0700 (PDT)
| Newsgroups | gmane.comp.jakarta.bcel.user |
|---|---|
| Message-ID | <[email protected]> |
Hello All,
I'm working on a "kind-of" dynamic java bytecode instrumenter using BCEL and
java.lang.instrument. I'm adding a list of instructions at specific
positions in the classfiles (using "insert" method in InstructionList
class), but when I run the instrumentation agent, I keep getting this
exception (class Test is the one I'm trying to instrument):
Exception in thread "main" java.lang.ClassFormatError: Invalid code
attribute name
index 66 in class file Test
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClassInternal(Unknown Source)
Can anyone help me in figuring out why this exception is being thrown and
how I can fix it ??
Thank you all in advance,
Marwa Ghali
--
View this message in context: http://www.nabble.com/BCEL-instrumentation--%3E-ClassFormatError-tp16326603p16326603.html
Sent from the BCEL - User mailing list archive at Nabble.com.