[JIRA] (JENKINS-37221) NullPointerException when running JacocoPublisher

3 views
Skip to first unread message

saiimons@gmail.com (JIRA)

unread,
Aug 5, 2016, 12:01:02 PM8/5/16
to jenkinsc...@googlegroups.com
Simon GUEROUT created an issue
 
Jenkins / Bug JENKINS-37221
NullPointerException when running JacocoPublisher
Issue Type: Bug Bug
Assignee: Ognjen Bubalo
Components: jacoco-plugin
Created: 2016/Aug/05 4:00 PM
Environment: Jenkins 2.16
Jacoco 2.1.0-beta1
Labels: plugin jacoco
Priority: Blocker Blocker
Reporter: Simon GUEROUT

Running this in my pipeline

step([$class: 'JacocoPublisher', execPattern:'build/jacoco/jacoco.exec', classPattern: 'build/classes/main', sourcePattern: 'src/main/java', exclusionPattern: '**/*Test.class'])

I end up getting the following NPE :

[JaCoCo plugin] Collecting JaCoCo coverage data...
[JaCoCo plugin] build/jacoco/jacoco.exec;build/classes/main;src/main/java; locations are configured
[JaCoCo plugin] Number of found exec files for pattern build/jacoco/jacoco.exec: 1
[JaCoCo plugin] Saving matched execfiles:  /var/lib/jenkins/jobs/BITBUCKET_TEAM_PROJECT/jobs/GIT_PROJECT/branches/v0.0.3/workspace/build/jacoco/jacoco.exec
[JaCoCo plugin] Saving matched class directories for class-pattern: build/classes/main:  /var/lib/jenkins/jobs/BITBUCKET_TEAM_PROJECT/jobs/GIT_PROJECT/branches/v0.0.3/workspace/build/classes/main
[JaCoCo plugin] Saving matched source directories for source-pattern: src/main/java:  /var/lib/jenkins/jobs/BITBUCKET_TEAM_PROJECT/jobs/GIT_PROJECT/branches/v0.0.3/workspace/src/main/java
[JaCoCo plugin] Loading inclusions files..
[JaCoCo plugin] inclusions: []
[JaCoCo plugin] exclusions: [**/*Test.class]
[JaCoCo plugin] Thresholds: JacocoHealthReportThresholds [minClass=0, maxClass=0, minMethod=0, maxMethod=0, minLine=0, maxLine=0, minBranch=0, maxBranch=0, minInstruction=0, maxInstruction=0, minComplexity=0, maxComplexity=0]
[JaCoCo plugin] Publishing the results..
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
[Bitbucket] Notifying commit build result
[Bitbucket] Build result notified
java.lang.NullPointerException
	at hudson.plugins.jacoco.JacocoBuildAction.getJacocoReport(JacocoBuildAction.java:204)
	at hudson.plugins.jacoco.JacocoBuildAction.getResult(JacocoBuildAction.java:219)
	at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:490)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:68)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:59)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1$1.call(AbstractSynchronousNonBlockingStepExecution.java:52)
	at hudson.security.ACL.impersonate(ACL.java:221)
	at org.jenkinsci.plugins.workflow.steps.AbstractSynchronousNonBlockingStepExecution$1.run(AbstractSynchronousNonBlockingStepExecution.java:49)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:745)
Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian JIRA (v7.1.7#71011-sha1:2526d7c)
Atlassian logo

saiimons@gmail.com (JIRA)

unread,
Aug 7, 2016, 4:38:02 PM8/7/16
to jenkinsc...@googlegroups.com
Simon GUEROUT commented on Bug JENKINS-37221
 
Re: NullPointerException when running JacocoPublisher

Just built the plugin with the latest master (https://github.com/jenkinsci/jacoco-plugin/commit/393a6265ff70a941ae15e35f31cad30017d3365b), and it works.
Can't compare with the code from 2.1.0-beta1, as it is not tagged on github.

jglick@cloudbees.com (JIRA)

unread,
Sep 7, 2016, 12:10:05 PM9/7/16
to jenkinsc...@googlegroups.com

dominik.stadler@gmx.at (JIRA)

unread,
Mar 23, 2017, 5:44:02 PM3/23/17
to jenkinsc...@googlegroups.com
centic resolved as Fixed
 

Release 2.2.0 is out, please try it and reopen if it still happens then.

Change By: centic
Status: Open Resolved
Resolution: Fixed
This message was sent by Atlassian JIRA (v7.3.0#73011-sha1:3c73d0e)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages