commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wayne <>
Subject [Javaflow]java.lang.NoSuchMethodError: org.objectweb.asm.ClassWriter.<init>(ZZ)V
Date Tue, 07 Jun 2011 08:54:38 GMT
Hi All:

I use [javaflow] Ant task with ASM transformer
but it still terminates with java.lang.NoSuchMethodError:

Torsten mentioned the solution as follow:

> 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:
For additional commands, e-mail:

View raw message