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

Emma - Coverage results = 0 causes error in the reports

      Using Emma, when coverage is equal to zero the report errors out.

          [JENKINS-12123] Emma - Coverage results = 0 causes error in the reports

          sogabe added a comment -

          Any logs?

          sogabe added a comment - Any logs?

          Steve Roth added a comment -

          I am seeing this as well –

          logfile shows:

          Dec 2, 2012 2:13:58 PM hudson.ExpressionFactory2$JexlExpression evaluate
          WARNING: Caught exception evaluating: it.getPercent(job). Reason: java.lang.NullPointerException
          java.lang.NullPointerException
          at jenkins.plugins.emmacoveragecolumn.EmmaColumn.getPercentageFloat(EmmaColumn.java:82)
          at jenkins.plugins.emmacoveragecolumn.EmmaColumn.getLinePercent(EmmaColumn.java:66)
          at jenkins.plugins.emmacoveragecolumn.EmmaColumn.getPercent(EmmaColumn.java:37)
          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.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258)
          at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104)
          at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83)
          at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57)
          at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51)
          at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80)
          at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:72)
          at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134)
          ...

          Steve Roth added a comment - I am seeing this as well – logfile shows: Dec 2, 2012 2:13:58 PM hudson.ExpressionFactory2$JexlExpression evaluate WARNING: Caught exception evaluating: it.getPercent(job). Reason: java.lang.NullPointerException java.lang.NullPointerException at jenkins.plugins.emmacoveragecolumn.EmmaColumn.getPercentageFloat(EmmaColumn.java:82) at jenkins.plugins.emmacoveragecolumn.EmmaColumn.getLinePercent(EmmaColumn.java:66) at jenkins.plugins.emmacoveragecolumn.EmmaColumn.getPercent(EmmaColumn.java:37) 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.commons.jexl.util.introspection.UberspectImpl$VelMethodImpl.invoke(UberspectImpl.java:258) at org.apache.commons.jexl.parser.ASTMethod.execute(ASTMethod.java:104) at org.apache.commons.jexl.parser.ASTReference.execute(ASTReference.java:83) at org.apache.commons.jexl.parser.ASTReference.value(ASTReference.java:57) at org.apache.commons.jexl.parser.ASTReferenceExpression.value(ASTReferenceExpression.java:51) at org.apache.commons.jexl.ExpressionImpl.evaluate(ExpressionImpl.java:80) at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:72) at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134) ...

          Steve Roth added a comment - - edited

          I would bump up the priority on this, since rendering a view is extremely slow when these NPE are occurring. If I remove the emma column from the view config, then it renders almost instantaneously.

          Steve Roth added a comment - - edited I would bump up the priority on this, since rendering a view is extremely slow when these NPE are occurring. If I remove the emma column from the view config, then it renders almost instantaneously.

          sogabe added a comment -

          component changed to emmacoveragecolumn.

          sogabe added a comment - component changed to emmacoveragecolumn.

          Dan Ebert added a comment -

          I'll take a look at it. Are you seeing it when the coverage is 0 or when there is no coverage (i.e. a project not using emma)?

          Dan Ebert added a comment - I'll take a look at it. Are you seeing it when the coverage is 0 or when there is no coverage (i.e. a project not using emma)?

          Dan Ebert added a comment -

          I fixed an issue where if the lastSuccessfulBuild didn't have an EmmaBuildAction it was throwing a NPE. I think this is the issue you were seeing.

          https://github.com/jenkinsci/emmacoveragecolumn-plugin/commit/8b291adce6d3974243f71217c42fb5681e2a8def

          Dan Ebert added a comment - I fixed an issue where if the lastSuccessfulBuild didn't have an EmmaBuildAction it was throwing a NPE. I think this is the issue you were seeing. https://github.com/jenkinsci/emmacoveragecolumn-plugin/commit/8b291adce6d3974243f71217c42fb5681e2a8def

          Steve Roth added a comment -

          Thanks Dan – reviewing the cases, I was actually seeing it when there was no coverage reported in some of the view jobs.

          Steve Roth added a comment - Thanks Dan – reviewing the cases, I was actually seeing it when there was no coverage reported in some of the view jobs.

          Dan Ebert added a comment -

          OK ... I think the fix I checked in should address that. Not sure what the schedule is for the new version of the plugin being available to install.

          Dan Ebert added a comment - OK ... I think the fix I checked in should address that. Not sure what the schedule is for the new version of the plugin being available to install.

            danebert Dan Ebert
            sdhas subhavani m
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: