Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-62368

NPE when List of allowed Projects is empty

    Details

    • Similar Issues:

      Description

      I got a NPE on the downstream job if the "Allowed Jobs"-List in an upstream project is empty. Maybe it was made empty by the "Migration Helper" or by mistake by me,

      ERROR: Build step failed with exception
      java.lang.NullPointerException
        at hudson.plugins.copyartifact.CopyArtifactPermissionProperty.canCopiedBy(CopyArtifactPermissionProperty.java:105)
        at hudson.plugins.copyartifact.CopyArtifactPermissionProperty.canCopyArtifact(CopyArtifactPermissionProperty.java:150)
        at hudson.plugins.copyartifact.CopyArtifact.canReadFrom(CopyArtifact.java:554)
        at hudson.plugins.copyartifact.CopyArtifact.perform(CopyArtifact.java:418)
        at hudson.tasks.BuildStepCompatibilityLayer.perform(BuildStepCompatibilityLayer.java:78)
        at hudson.tasks.BuildStepMonitor$1.perform(BuildStepMonitor.java:20)
        at hudson.model.AbstractBuild$AbstractBuildExecution.perform(AbstractBuild.java:741)
        at hudson.model.Build$BuildExecution.build(Build.java:206)
        at hudson.model.Build$BuildExecution.doRun(Build.java:163)
        at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:504)
        at hudson.model.Run.execute(Run.java:1856)
        at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
        at hudson.model.ResourceController.execute(ResourceController.java:97)
        at hudson.model.Executor.run(Executor.java:428)
      

        Attachments

          Activity

          Hide
          ikedam ikedam added a comment -

          It never be null as far as I know, and I could not reproduce the issue.

          Please let me know following to see what happens:

          • What type is the upstream job. Pipeline, freestyle, matrix, and so on.
          • Please attach Jenkinsfile (or quote the part of copyartifactpermission) if the job is pipeline.
          • Please attach config.xml of the job if the job is freestyle, matrix, and so on. It would be allocated on JENKINS_HOME/jobs/JOB_NAME/config.xml.
          Show
          ikedam ikedam added a comment - It never be null as far as I know, and I could not reproduce the issue. Please let me know following to see what happens: What type is the upstream job. Pipeline, freestyle, matrix, and so on. Please attach Jenkinsfile (or quote the part of copyartifactpermission) if the job is pipeline. Please attach config.xml of the job if the job is freestyle, matrix, and so on. It would be allocated on JENKINS_HOME/jobs/JOB_NAME/config.xml.

            People

            • Assignee:
              nigjo Jens H
              Reporter:
              nigjo Jens H
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: