dependency-track: dependencyTrackPublisher artifact: 'dependency-check-report.xml', artifactType: 'scanResult', projectId: 'Unable to retrieve projects. Received status code: 404'

Hi, i can’t find why … no log or more info…

When i go in Jenkins -> Pipeline Syntax: Snippet Generator

I chose dependencyTrackPublisher … for projectId, i receive this message : ‘Unable to retrieve projects. Received status code: 404’

I create my project in dependency-track, i have this id, in URL … a5b42356-3608-4513-8f56-35dc70690402

if i try to run the snippet in my pipeline : dependencyTrackPublisher artifact: 'dependency-check-report.xml', artifactType: 'scanResult', projectId: 'a5b42356-3608-4513-8f56-35dc70690402'

so i receive this error : [Pipeline] [Analyse Code Security] dependencyTrackPublisher [Analyse Code Security] [DependencyTrack] Publishing artifact to Dependency-Track [Pipeline] [Analyse Code Security] echo [Analyse Code Security] Exception thrown: [Analyse Code Security] java.lang.NullPointerException [Pipeline] [Analyse Code Security] echo [Analyse Code Security] Stacktrace: [Pipeline] [Analyse Code Security] } [Pipeline] [Analyse Code Security] // script [Pipeline] [Analyse Code Security] } [Pipeline] [Analyse Code Security] // withEnv [Pipeline] [Analyse Code Security] } [Pipeline] [Analyse Code Security] // stage [Pipeline] [Analyse Code Security] } i have a jenkins prod server. I install in my local docker environnement Dependency-Track and port 8080 is open. The server can ping and wget on my http:/ip:8080/

I setup the “Dependency-Track URL” and “API key” in my Master Jenkins server.

… so i don’t understand why this don’t work … i don’t see any errors in logs or something.

Regards Mortagne

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 16 (6 by maintainers)

Commits related to this issue

Most upvoted comments

The VIEW_PORTFOLIO permission has been added as a default for all new installations going forward. However, please add the permission to resolve the issue. Example: add-view-portfolio-permission