Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin complains about "INVOKESPECIAL/STATIC on interfaces require ASM 5" although ASM 5.0.1 present #22

Open
ctron opened this issue Jul 20, 2016 · 2 comments

Comments

@ctron
Copy link

ctron commented Jul 20, 2016

In the build I do the get following output:

[WARN] Unable to instrument file XXX/MyClass.class
java.lang.IllegalArgumentException: INVOKESPECIAL/STATIC on interfaces require ASM 5
    at org.objectweb.asm.MethodVisitor.visitMethodInsn(Unknown Source) ~[asm-5.0.1.jar:5.0.1]
    at org.objectweb.asm.ClassReader.a(Unknown Source) ~[asm-5.0.1.jar:5.0.1]
    at org.objectweb.asm.ClassReader.b(Unknown Source) ~[asm-5.0.1.jar:5.0.1]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.0.1.jar:5.0.1]
    at org.objectweb.asm.ClassReader.accept(Unknown Source) ~[asm-5.0.1.jar:5.0.1]
    at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:161) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.instrumentClass(CoberturaInstrumenter.java:129) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.instrument.CoberturaInstrumenter.addInstrumentationToSingleClass(CoberturaInstrumenter.java:243) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.instrument.CodeInstrumentationTask.addInstrumentationToSingleClass(CodeInstrumentationTask.java:299) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.instrument.CodeInstrumentationTask.addInstrumentation(CodeInstrumentationTask.java:308) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.instrument.CodeInstrumentationTask.instrument(CodeInstrumentationTask.java:90) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.dsl.Cobertura.instrumentCode(Cobertura.java:74) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.instrument.InstrumentMain.instrument(InstrumentMain.java:82) [cobertura-2.1.1.jar:2.1.1]
    at net.sourceforge.cobertura.instrument.InstrumentMain.main(InstrumentMain.java:99) [cobertura-2.1.1.jar:2.1.1]

So from the stack trace it seems that ASM 5.0.1 is present. Still it complains that ASM 5 is missing.

@erfangc
Copy link

erfangc commented Nov 22, 2016

seems like it was fixed in cobertura/cobertura#299 need to PR master and up the dep version (currently 2.1.1)

@codejayant
Copy link

I see the same issue after 2 years from the original post. Any workaround is appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants