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

NPE when List of allowed Projects is empty

    XMLWordPrintable

    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

          nigjo Jens H created issue -
          nigjo Jens H made changes -
          Field Original Value New Value
          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)}}
          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,


          {noformat}
          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)
          {noformat}
          Summary NPE when List of alloed Projects is empty NPE when List of allowed Projects is empty
          ikedam ikedam made changes -
          Assignee ikedam [ ikedam ]
          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.
          ikedam ikedam made changes -
          Assignee ikedam [ ikedam ] Jens H [ nigjo ]
          Hide
          ikedam ikedam added a comment -

          No additional information from the reporter.

          Show
          ikedam ikedam added a comment - No additional information from the reporter.
          ikedam ikedam made changes -
          Resolution Incomplete [ 4 ]
          Status Open [ 1 ] Fixed but Unreleased [ 10203 ]

            People

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

              Dates

              Created:
              Updated:
              Resolved: