-
Bug
-
Resolution: Fixed
-
Minor
-
None
-
Jenkins 1.478 - Project statistics Plugin 0.3
NullPointerException using Project Stats plugin in Jenkins :
Stack trace :
java.lang.NullPointerException
at hudson.plugins.projectstats.NumBuildsStats.compute(NumBuildsStats.java:51)
at hudson.plugins.projectstats.column.NumBuildsColumn.getStats(NumBuildsColumn.java:53)
at sun.reflect.GeneratedMethodAccessor137.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
at java.lang.reflect.Method.invoke(Method.java:611)
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:73)
at hudson.ExpressionFactory2$JexlExpression.evaluate(ExpressionFactory2.java:72)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$3.run(CoreTagLibrary.java:134)
at org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:95)
at org.apache.commons.jelly.tags.core.CoreTagLibrary$2.run(CoreTagLibrary.java:105)
at org.kohsuke.stapler.jelly.JellyViewScript.run(JellyViewScript.java:81)
at org.kohsuke.stapler.jelly.IncludeTag.doTag(IncludeTag.java:99)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:270)
at org.apache.commons.jelly.TagSupport.invokeBody(TagSupport.java:161)
...
Error occured in this method :
public void compute(Job job) {
List<Run> builds = job.getBuilds();
for (Run build : builds)
}
build.getResult() seems to be null.
I've made a groovy script to find job where a build can have a null result :
Jenkins.instance.items.findAll
{job -> job.isBuildable()}.each{ Job job ->
if(job.getBuilds() != null) {
for (Run build : job.getBuilds()) {
if(build.getResult() == null)
}
}
}
All resulting jobs are currently building.
It seems that the plugin don't check if the job is currently building, that result in a NullPointerException here.
Michaƫl
- is duplicated by
-
JENKINS-9608 NPE when computing build results in NumBuildsStatsBuilder
- Closed
-
JENKINS-14935 NPE when computing number of builds for column display in NumBuildsStats
- Closed