Hi All: I use [javaflow] Ant task with ASM transformer but it still terminates with java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(ZZ)V
Torsten mentioned the solution as follow: (http://mail-archives.apache.org/mod_mbox/commons-user/200608.mbox/%3c98e4f1cd0608240555j5fd1ead9ma44d2f77ba7e7...@mail.gmail.com%3E) > For the task: > I tried asm 2.2.3 and asm 3.0 RC1, but I always get this exception: > java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(ZZ)V > > I can't make any sense out of it. Looks like for some reason you have the wrong version of ASM in your classpath?! > For me, it seems as it's an issue of the JVM: I am using Java 1.5 and > the previous example is using Java Generics. > Could that be cause of the problem? Could be the case ...but unlikely - I am also using 1.5 > I could not find any comment in the official documentation (neither > bcel nor asm) but from what I read from the mailing lists, > it seems as if both frameworks don't work with Java 1.5 byte code. 1.5 byte code is not much different from 1.4 because generics are not implemented on the byte code level. So in theory this should not harm the instrumentation. But there are still a few things differenent. Proper support for 1.5 has only been added to BCEL trunk just recently. Pretty sure ASM does fully support 1.5 and (at least trunk) even 1.6. > > .could please file all these information into a jira issue? > Of course. Even if this is a Java version issue? It would be great if you could compile your testcase without the generics and target to 1.4 and then report back. But yes, please open an issue and add all information to it. I try to use JDK 1.4 or JDK 1.3, JDK 1.5, but still same error. Is anybody know the solution. Thank you in advance. >From Wayne --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@commons.apache.org For additional commands, e-mail: user-h...@commons.apache.org