5

I am getting below exception while running build on Jenkins, the scenario where my build get failed is Integration-test section of my project. However all of my junit and cucumber test-cases working fine on my localmachine.

Exception which I received on Jenkins server.

field - $jacocoData Exception is - java.beans.IntrospectionException: Method not found: is$jacocoData  
Simmant
  • 1,477
  • 25
  • 39
  • I have same problem? Did you resolve? My jacoco maven plugin version is `0.7.9` – fabiohbarbosa Jun 21 '17 at 17:50
  • @fabiohbarbosa sorry for replying so late mate, yup I had closely monitor my Jenkins and my local log, there is issue with my mocking which point to the local instead of server url. – Simmant Sep 07 '17 at 13:50

1 Answers1

7

You can see the issue:https://github.com/jacoco/jacoco/issues/168

To collect execution data JaCoCo instruments the classes under test which adds two members to the classes: A private static field $jacocoData and a private static method $jacocoInit(). Both members are marked as synthetic. Please change your code to ignore synthetic members. This is a good practice anyways as also the Java compiler creates synthetic members in certain situation.

For Example refer the code below:

   for (Field field : fields) {
    if (!field.isSynthetic()) {
        // enter code here
    }
   }
4EACH
  • 2,132
  • 4
  • 20
  • 28
Kerry Jin
  • 131
  • 2
  • 4