Re: Error when using CheckClassAdapter

Remi Forax <[email protected]>
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <[email protected]>
Wild guess, you have updated asm.jar but not asm-util.jar?

Sent from my phone. 


Jayanga Wagaarachchi <[email protected]> wrote:

>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.
>
>
>-- 
>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
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.