Hi Matthew,

this typically happens when a class has invalid stackmap frames. Even if the JVM has a fall-back to the old verififier in such situations, JaCoCo accepts valid class files only. This is typically caused by other tools or libraries modifying the Java bytecode (e.g. some persistence implementations).

I could take a closer look, if you provide the class file "com/xxx/xx/xx/xx/xxx" as seen by the JaCoCo agent. For this please specify the 'classdumpdir' option to the JaCoCo agent (see http://www.eclemma.org/jacoco/trunk/doc/agent.html).

Alternatively you might simply exclude the class in question.

Best regards,
-marc



On 2014-11-25 11:27, matthew wrote:
Jacoco threw below exception while instrumenting the class, but others are okay.

[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R
java.lang.instrument.IllegalClassFormatException: Error while
instrumenting class com/xxx/xx/xx/xx/xxx
[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.CoverageTransformer.transform(CoverageTransformer.java:89)
[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R    at
sun.instrument.TransformerManager.transform(TransformerManager.java:200)
[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R    at
sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:446)
[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R    at
java.lang.ClassLoader.defineClassImpl(Native Method)
[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R    at
java.lang.ClassLoader.defineClass(ClassLoader.java:306)
[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R    at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:154)
[11/25/14 10:13:47:370 CST] 00000117 SystemErr     R    at
com.ibm.ws.classloader.CompoundClassLoader._defineClass(CompoundClassLoader.java:853)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
com.ibm.ws.classloader.CompoundClassLoader.localFindClass(CompoundClassLoader.java:763)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java:586)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
java.lang.ClassLoader.loadClass(ClassLoader.java:707)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
java.lang.J9VMInternals.verifyImpl(Native Method)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
java.lang.J9VMInternals.verify(J9VMInternals.java:94)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
java.lang.J9VMInternals.verify(J9VMInternals.java:92)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
java.lang.J9VMInternals.initialize(J9VMInternals.java:171)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
java.lang.Class.forNameImpl(Native Method)
[11/25/14 10:13:47:371 CST] 00000117 SystemErr     R    at
java.lang.Class.forName(Class.java:181)
[....]
[11/25/14 10:13:47:372 CST] 00000117 SystemErr     R    at
java.security.AccessController.doPrivileged(AccessController.java:274)
[....]
[11/25/14 10:13:47:373 CST] 00000117 SystemErr     R Caused by:
java.io.IOException: Error while instrumenting class
com/xxx/xx/xx/xx/xxx
[11/25/14 10:13:47:373 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.core.instr.Instrumenter.instrumentError(Instrumenter.java:152)
[11/25/14 10:13:47:373 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.core.instr.Instrumenter.instrument(Instrumenter.java:103)
[11/25/14 10:13:47:373 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.CoverageTransformer.transform(CoverageTransformer.java:87)
[11/25/14 10:13:47:373 CST] 00000117 SystemErr     R    ... 35 more
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R Caused by:
java.lang.ArrayIndexOutOfBoundsException
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
java.util.ArrayList.elementData(ArrayList.java:411)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
java.util.ArrayList.remove(ArrayList.java:488)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.commons.AnalyzerAdapter.pop(AnalyzerAdapter.java:552)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.commons.AnalyzerAdapter.execute(AnalyzerAdapter.java:671)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.commons.AnalyzerAdapter.visitVarInsn(AnalyzerAdapter.java:278)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.tree.VarInsnNode.accept(VarInsnNode.java:86)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.tree.InsnList.accept(InsnList.java:162)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.tree.MethodNode.accept(MethodNode.java:815)
[11/25/14 10:13:47:374 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.core.internal.flow.ClassProbesAdapter$1.visitEnd(ClassProbesAdapter.java:122)
[11/25/14 10:13:47:375 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.ClassReader.readMethod(ClassReader.java:1021)
[11/25/14 10:13:47:375 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.ClassReader.accept(ClassReader.java:693)
[11/25/14 10:13:47:375 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.asm.ClassReader.accept(ClassReader.java:506)
[11/25/14 10:13:47:375 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.core.instr.Instrumenter.instrument(Instrumenter.java:83)
[11/25/14 10:13:47:375 CST] 00000117 SystemErr     R    at
org.jacoco.agent.rt.internal_e6e56f0.core.instr.Instrumenter.instrument(Instrumenter.java:101)
[11/25/14 10:13:47:375 CST] 00000117 SystemErr     R    ... 36 more

--
You received this message because you are subscribed to the Google Groups "JaCoCo 
and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/e7198ad79e0d60332e1b10d4d6caac8d%40mountainminds.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to