clover jenkins plugin link "clover summary report error"

will zhang September 2, 2016

Hi,

 

A Clover jenkins plugin issue after couple runs of my code coverage build on jenkins.

The code coverage tracking graph is gone.

The summary line of each job shows this: "Clover Code Coverage - null% method null, conditional null, statement null. "

Clicking on " Clover Summary Report" give me  an exception as below:

 

com.google.common.util.concurrent.UncheckedExecutionException: java.lang.NullPointerException
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2234)
	at com.google.common.cache.LocalCache.get(LocalCache.java:3965)
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3969)
	at com.google.common.cache.LocalCache$LocalManualCache.get(LocalCache.java:4829)
	at hudson.plugins.clover.CloverBuildAction.getResult(CloverBuildAction.java:162)
	at hudson.plugins.clover.CloverBuildAction.getTarget(CloverBuildAction.java:111)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:674)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$13.dispatch(MetaClass.java:411)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.MetaClass$6.doDispatch(MetaClass.java:249)
	at org.kohsuke.stapler.NameBasedDispatcher.dispatch(NameBasedDispatcher.java:53)
	at org.kohsuke.stapler.Stapler.tryInvoke(Stapler.java:746)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:876)
	at org.kohsuke.stapler.Stapler.invoke(Stapler.java:649)
	at org.kohsuke.stapler.Stapler.service(Stapler.java:238)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
	at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:686)
	at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1494)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:132)
	at com.cloudbees.jenkins.support.slowrequest.SlowRequestFilter.doFilter(SlowRequestFilter.java:37)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
	at com.smartcodeltd.jenkinsci.plugin.assetbundler.filters.LessCSS.doFilter(LessCSS.java:46)
	at hudson.util.PluginServletFilter$1.doFilter(PluginServletFilter.java:129)
	at 

 

By digging into jenkins log, I found the exception message:

 

Sep 02, 2016 9:50:41 AM hudson.ExpressionFactory2$JexlExpression evaluate

WARNING: Caught exception evaluating: it.elementCoverage in /job/nsx-code-coverage-ccp-unit/43/. Reason: java.lang.reflect.InvocationTargetException

 

Is this path correct?

 

By looking into github code, I pinned down the problem to this line:

https://github.com/jenkinsci/clover-plugin/blob/master/src/main/java/hudson/plugins/clover/CloverPublisher.java

 

 

static File getCloverXmlReport(Run<?, ?> build) {
 
    return new File(build.getRootDir(), "clover.xml");
 
}

 

 

Is build.getRootDir() the right way to get correct path for clover.xml?

1 answer

0 votes
Marek Parfianowicz
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
October 30, 2016

Hi Will, your issue sounds similar to the issue fixed in recently merged pull-request:

https://github.com/jenkinsci/clover-plugin/commit/ec07020068e5e1b23d12053d42eb2149629fac4b 

Please note that there is no official release with this fix yet. You may want to try the fix by building a snapshot version (git clone + mvn install) and installing it in Jenkins.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events