[JIRA] (JENKINS-60522) NullPointerException despite report being in the directory

2 views
Skip to first unread message

chinzhiqiang@gmail.com (JIRA)

unread,
Dec 18, 2019, 3:12:04 AM12/18/19
to jenkinsc...@googlegroups.com
Zhi Qiang Chin created an issue
 
Jenkins / Bug JENKINS-60522
NullPointerException despite report being in the directory
Issue Type: Bug Bug
Assignee: Unassigned
Components: dependency-check-jenkins-plugin
Created: 2019-12-18 08:11
Environment: Jenkins 2.190.3 , Deployed on GKE
Priority: Minor Minor
Reporter: Zhi Qiang Chin

The following build log shows that the report.html is in the directory that the step
dependencyCheckPublisher is running on , and yet the step reports NullPointerException

+ pwd
/var/jenkins_home/testws
[Pipeline] sh (hide)
+ ls -lah results
total 136K
drwxr-sr-x 2 jenkins jenkins 4.0K Dec 18 07:50 .
drwxr-sr-x 3 jenkins jenkins 4.0K Dec 18 07:50 ..
-rw-r--r-- 1 jenkins jenkins 127K Dec 18 08:07 dependency-check-report.html
[Pipeline] dependencyCheckPublisher
[DependencyCheck] Collecting Dependency-Check artifact
[DependencyCheck] Unable to parse /var/jenkins_home/testws/results/dependency-check-report.html
[Pipeline] }
[Pipeline] // ws
[Pipeline] }
[Pipeline] // stage
[Pipeline] }
[Pipeline] // node
[Pipeline] End of Pipeline
java.lang.NullPointerException
	at org.jenkinsci.plugins.DependencyCheck.ConsoleLogger.log(ConsoleLogger.java:43)
	at org.jenkinsci.plugins.DependencyCheck.DependencyCheckPublisher.perform(DependencyCheckPublisher.java:141)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80)
	at org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67)
	at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
	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:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)
Finished: FAILURE
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo

tom.gl@free.fr (JIRA)

unread,
Jan 28, 2020, 4:57:03 PM1/28/20
to jenkinsc...@googlegroups.com
Thomas de Grenier de Latour commented on Bug JENKINS-60522
 
Re: NullPointerException despite report being in the directory

The problem here is that you're pointing an HTML report instead of an XML report:

[DependencyCheck] Unable to parse /var/jenkins_home/testws/results/dependency-check-report.html

Since the .html is all you have in your results directory, I guess you're specifying the --format HTML parameter. Try adding --format XML too, you'll get both output files, and then point your publisher to dependency-check-report.xml (and you can use the Publish HTML report plugin to publish the HTML too if you want).

The NPE simply looks like an unfortunate side effect of this error.

Reply all
Reply to author
Forward
0 new messages