Error when using CheckClassAdapter
Jayanga Wagaarachchi <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <CAFCfdqwavTWSJ_eut4+tESZTLuuy3fK860DvPTNbHTU+TOOrWw@mail.gmail.com> |
Hi,
I wants to verify a class which I modified using ASM. I used the code
example given in the documentation of CheckClassAdapter. But I receive an
error
"Exception in thread "main" java.lang.NoSuchMethodError:
org.objectweb.asm.ClassReader.accept(Lorg/objectweb/asm/ClassVisitor;Z)V
at org.objectweb.asm.util.CheckClassAdapter.verify(Unknown Source) "
I dont know why this error happens. Here is the code I used. Please tell me
what I am doing wrong here
byte[] cl = bs.toByteArray();
ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_FRAMES);
ClassReader cr = new ClassReader(cl);
ClassVisitor cv = new MyCheckClassAdapter(new
CheckClassAdapter(cw));
cr.accept(cv, 0);
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
CheckClassAdapter.verify(cr, true, pw);
Thank you.
--
Jayanga Wagaarachchi
Computer Science and Engineering
University of Moratuwa.
message-footer.txt
(text/plain, 238 B)
-- You receive this message as a subscriber of the [email protected] mailing list. To unsubscribe: mailto:[email protected] For general help: mailto:[email protected]?subject=help OW2 mailing lists service home page: http://www.ow2.org/wws