[DependencyTrack] Publishing artifact to Dependency-Track ERROR: Build step failed with exception java.lang.NullPointerException at hudson.tasks.Publisher.getDescriptor(Publisher.java:122) at hudson.tasks.Recorder.getDescriptor(Recorder.java:51) at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.getDescriptor(DependencyTrackPublisher.java:205) at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.upload(DependencyTrackPublisher.java:167) at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.access$100(DependencyTrackPublisher.java:56) at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher$1.call(DependencyTrackPublisher.java:120) at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher$1.call(DependencyTrackPublisher.java:118) at hudson.remoting.UserRequest.perform(UserRequest.java:181) at hudson.remoting.UserRequest.perform(UserRequest.java:52) at hudson.remoting.Request$2.run(Request.java:336) at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68) 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 hudson.remoting.Engine$1$1.run(Engine.java:98) at java.lang.Thread.run(Thread.java:748) at ......remote call to JNLP4-connect connection from *..*./ **..*.*:35432(Native Method) at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1554) at hudson.remoting.UserResponse.retrieve(UserRequest.java:281) at hudson.remoting.Channel.call(Channel.java:839) at org.jenkinsci.plugins.DependencyCheck.DependencyTrackPublisher.perform(DependencyTrackPublisher.java:118) at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:81) at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20) at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:730) at hudson.model.AbstractBuild$AbstractBuildExecution.performAllBuildSteps(AbstractBuild.java:676) at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.post2(MavenModuleSetBuild.java:1073) at hudson.model.AbstractBuild$AbstractBuildExecution.post(AbstractBuild.java:621) at hudson.model.Run.execute(Run.java:1760) at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:543) at hudson.model.ResourceController.execute(ResourceController.java:97) at hudson.model.Executor.run(Executor.java:415) Build step 'Publish results to Dependency-Track' marked build as failure
I've confirmed this to be a defect in the Jenkins plugin. Publishing works as expected when executing from the master node but fails with an NullPointerException when running from a slave.
Code changed in jenkins User: stevespringett Path: pom.xml src/main/java/org/jenkinsci/plugins/DependencyCheck/DependencyTrackPublisher.java src/main/webapp/help-dt-projectid.html http://jenkins-ci.org/commit/dependency-check-plugin/3776f5f1d591585634cbb295f624b5c41b701259 Log: Fix for JENKINS-51053. FilePath is accessible from master or slave. No need to force execution on slave. Simplified. Added verbage to doc regarding permissions. Updated version to 3.1.2.1
Thanks for reporting the issue. I've pushed an updated release which resolves this issue (and a few others).
Version 3.1.2.1 will show up in the Jenkins update site in a few hours. Or it can be downloaded and manually installed without waiting for the update site to sync.
I upgraded the plugin version to 1.3.2.1, but now I encountered another issue as below.
[DependencyTrack] Publishing artifact to Dependency-Track
[DependencyTrack] Could not connect to Dependency-Track. Received response code: 413 Request Entity Too Large Build step 'Publish results to Dependency-Track' changed build result to FAILURE