• Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: Major Major
    • copyartifact-plugin
    • None

      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)
      

          [JENKINS-62368] NPE when List of allowed Projects is empty

          Jens H created issue -
          Jens H made changes -
          Description Original: 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)}}
          New: 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 Original: NPE when List of alloed Projects is empty New: NPE when List of allowed Projects is empty
          ikedam made changes -
          Assignee New: ikedam [ 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 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 made changes -
          Assignee Original: ikedam [ ikedam ] New: Jens H [ nigjo ]

          ikedam added a comment -

          No additional information from the reporter.

          ikedam added a comment - No additional information from the reporter.
          ikedam made changes -
          Resolution New: Incomplete [ 4 ]
          Status Original: Open [ 1 ] New: Fixed but Unreleased [ 10203 ]
          Mark Waite made changes -
          Resolution Original: Incomplete [ 4 ] New: Cannot Reproduce [ 5 ]
          Status Original: Fixed but Unreleased [ 10203 ] New: Closed [ 6 ]

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

              Created:
              Updated:
              Resolved: