Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-16899

jacoco plugin exception java.lang.instrument.IllegalClassFormatException: Error while instrumenting class

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not A Defect
    • Icon: Major Major
    • jacoco-plugin
    • Jenkins 1.502, Linux CentOS Redhat 6.2, Java 1.6.0_30

      Anybody know tricks to get the JaCoCo plugin working?
      Here's some of a very long output:

      java.lang.instrument.IllegalClassFormatException: Error while instrumenting class com/company/a/b/c/dUtil.
      at org.jacoco.agent.rt.internal_5d10cad.CoverageTransformer.transform(CoverageTransformer.java:91)
      at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
      at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.Class.getDeclaredFields0(Native Method)
      at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
      at java.lang.Class.getDeclaredFields(Class.java:1743)
      at org.junit.runners.model.TestClass.<init>(TestClass.java:44)
      at org.junit.runners.ParentRunner.<init>(ParentRunner.java:73)
      at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:55)
      at org.springframework.test.context.junit4.SpringJUnit4ClassRunner.<init>(SpringJUnit4ClassRunner.java:104)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
      at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
      at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
      at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:31)
      at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:24)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
      at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
      at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
      at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: java.lang.IllegalStateException: Missing or invalid stackmap frames.
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.instr.FrameTracker.assertValidFrames(FrameTracker.java:613)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.instr.FrameTracker.pop(FrameTracker.java:608)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.instr.FrameTracker.visitJumpInsn(FrameTracker.java:518)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.instr.MethodInstrumenter.visitJumpInsnWithProbe(MethodInstrumenter.java:68)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.flow.MethodProbesAdapter.visitJumpInsn(MethodProbesAdapter.java:72)
      at org.jacoco.agent.rt.internal_5d10cad.asm.tree.JumpInsnNode.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.tree.InsnList.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.tree.MethodNode.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.flow.ClassProbesAdapter$1.visitEnd(ClassProbesAdapter.java:124)
      at org.jacoco.agent.rt.internal_5d10cad.asm.ClassReader.b(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.ClassReader.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.ClassReader.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.core.instr.Instrumenter.instrument(Instrumenter.java:74)
      at org.jacoco.agent.rt.internal_5d10cad.core.instr.Instrumenter.instrument(Instrumenter.java:87)
      at org.jacoco.agent.rt.internal_5d10cad.CoverageTransformer.transform(CoverageTransformer.java:89)
      ... 42 more
      java.lang.instrument.IllegalClassFormatException: Error while instrumenting class com/company/a/b/c/dUtil.
      at org.jacoco.agent.rt.internal_5d10cad.CoverageTransformer.transform(CoverageTransformer.java:91)
      at sun.instrument.TransformerManager.transform(TransformerManager.java:169)
      at sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:365)
      at java.lang.ClassLoader.defineClass1(Native Method)
      at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:615)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
      at java.net.URLClassLoader.defineClass(URLClassLoader.java:283)
      at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
      at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
      at java.lang.Class.getDeclaredFields0(Native Method)
      at java.lang.Class.privateGetDeclaredFields(Class.java:2291)
      at java.lang.Class.getDeclaredFields(Class.java:1743)
      at org.junit.runners.model.TestClass.<init>(TestClass.java:44)
      at org.junit.runners.ParentRunner.<init>(ParentRunner.java:73)
      at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:55)
      at org.junit.internal.builders.JUnit4Builder.runnerForClass(JUnit4Builder.java:13)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:29)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:57)
      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:24)
      at org.apache.maven.surefire.junit4.JUnit4TestSet.<init>(JUnit4TestSet.java:45)
      at org.apache.maven.surefire.junit4.JUnit4DirectoryTestSuite.createTestSet(JUnit4DirectoryTestSuite.java:56)
      at org.apache.maven.surefire.suite.AbstractDirectoryTestSuite.locateTestSets(AbstractDirectoryTestSuite.java:96)
      at org.apache.maven.surefire.Surefire.createSuiteFromDefinition(Surefire.java:209)
      at org.apache.maven.surefire.Surefire.run(Surefire.java:156)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.apache.maven.surefire.booter.SurefireBooter.runSuitesInProcess(SurefireBooter.java:345)
      at org.apache.maven.surefire.booter.SurefireBooter.main(SurefireBooter.java:1009)
      Caused by: java.lang.IllegalStateException: Missing or invalid stackmap frames.
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.instr.FrameTracker.assertValidFrames(FrameTracker.java:613)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.instr.FrameTracker.pop(FrameTracker.java:602)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.instr.FrameTracker.visitInsn(FrameTracker.java:256)
      at org.jacoco.agent.rt.internal_5d10cad.asm.MethodVisitor.visitInsn(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.flow.MethodProbesAdapter.visitInsn(MethodProbesAdapter.java:64)
      at org.jacoco.agent.rt.internal_5d10cad.asm.tree.InsnNode.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.tree.InsnList.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.tree.MethodNode.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.core.internal.flow.ClassProbesAdapter$1.visitEnd(ClassProbesAdapter.java:124)
      at org.jacoco.agent.rt.internal_5d10cad.asm.ClassReader.b(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.ClassReader.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.asm.ClassReader.accept(Unknown Source)
      at org.jacoco.agent.rt.internal_5d10cad.core.instr.Instrumenter.instrument(Instrumenter.java:74)
      at org.jacoco.agent.rt.internal_5d10cad.core.instr.Instrumenter.instrument(Instrumenter.java:87)
      at org.jacoco.agent.rt.internal_5d10cad.CoverageTransformer.transform(CoverageTransformer.java:89)
      ... 36 more

            ognjenb Ognjen Bubalo
            asloan7 Adam Sloan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: