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

NPE during Deleteing of Jobs

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      I'm trying to delete all of my generated jobs but the process fails partway thru with a NPE:

      java.lang.NullPointerException
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:617)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobs(GeneratorRun.java:584)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobs(GeneratorRun.java:598)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.doRun(GeneratorRun.java:250)
      	at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
      	at hudson.model.Run.execute(Run.java:1575)
      	at org.jenkinsci.plugins.jobgenerator.GeneratorRun.run(GeneratorRun.java:229)
      	at hudson.model.ResourceController.execute(ResourceController.java:88)
      	at hudson.model.Executor.run(Executor.java:237)
      	at hudson.model.OneOffExecutor.run(OneOffExecutor.java:66)
      
      

        Attachments

          Activity

          walterk82 Walter Kacynski created issue -
          walterk82 Walter Kacynski made changes -
          Field Original Value New Value
          Description I'm trying to delete all of my generated jobs but the process fails partway thru with a NPE:

          {{noformat}}
          java.lang.NullPointerException
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:617)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobs(GeneratorRun.java:584)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobs(GeneratorRun.java:598)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.doRun(GeneratorRun.java:250)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
          at hudson.model.Run.execute(Run.java:1575)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun.run(GeneratorRun.java:229)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          at hudson.model.OneOffExecutor.run(OneOffExecutor.java:66)

          {{noformat}}
          I'm trying to delete all of my generated jobs but the process fails partway thru with a NPE:

          {noformat}
          java.lang.NullPointerException
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:617)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobFromPreviousBuild(GeneratorRun.java:647)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJob(GeneratorRun.java:637)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobs(GeneratorRun.java:584)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.deleteJobs(GeneratorRun.java:598)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun$GeneratorImpl.doRun(GeneratorRun.java:250)
          at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:580)
          at hudson.model.Run.execute(Run.java:1575)
          at org.jenkinsci.plugins.jobgenerator.GeneratorRun.run(GeneratorRun.java:229)
          at hudson.model.ResourceController.execute(ResourceController.java:88)
          at hudson.model.Executor.run(Executor.java:237)
          at hudson.model.OneOffExecutor.run(OneOffExecutor.java:66)

          {noformat}
          syl20bnr Sylvain Benner made changes -
          Assignee Sylvain Benner [ syl20bnr ]
          Hide
          syl20bnr Sylvain Benner added a comment -

          It it possible to write down your job hierarchy ?
          The deletion of jobs is not an easy task. Currently it relies on the build history, if it is incomplete or wiped I think it can produce NPEs, I'll check into this.
          Thank you for the report.

          Show
          syl20bnr Sylvain Benner added a comment - It it possible to write down your job hierarchy ? The deletion of jobs is not an easy task. Currently it relies on the build history, if it is incomplete or wiped I think it can produce NPEs, I'll check into this. Thank you for the report.
          Hide
          walterk82 Walter Kacynski added a comment - - edited

          The structure is:

          SND-Deploy-AA_Generate -> (template) SND-Deploy-AA_Template = SND-Deploy-AA_Stream_DO_NOT_RUN and SND-Deploy-[JOBS A, B, C... x 100]
          

          Only one the concrete jobs had a job history. The others had never been run.

          Show
          walterk82 Walter Kacynski added a comment - - edited The structure is: SND-Deploy-AA_Generate -> (template) SND-Deploy-AA_Template = SND-Deploy-AA_Stream_DO_NOT_RUN and SND-Deploy-[JOBS A, B, C... x 100] Only one the concrete jobs had a job history. The others had never been run.
          Hide
          syl20bnr Sylvain Benner added a comment -

          You generate 100 jobs so maybe the build history for the parent job generator is not complete.

          I guess I must find a way to keep track of the generated jobs outside of build history or find a clever way to find which jobs are to be deleted.

          Show
          syl20bnr Sylvain Benner added a comment - You generate 100 jobs so maybe the build history for the parent job generator is not complete. I guess I must find a way to keep track of the generated jobs outside of build history or find a clever way to find which jobs are to be deleted.
          Hide
          walterk82 Walter Kacynski added a comment -

          I see what you mean. At one point or another I needed to cancel the generation because of errors. Also, I only kept the last 10 runs of the generation to the logs definitely rolled off.

          Show
          walterk82 Walter Kacynski added a comment - I see what you mean. At one point or another I needed to cancel the generation because of errors. Also, I only kept the last 10 runs of the generation to the logs definitely rolled off.
          rtyler R. Tyler Croy made changes -
          Workflow JNJira [ 149969 ] JNJira + In-Review [ 177531 ]

            People

            Assignee:
            syl20bnr Sylvain Benner
            Reporter:
            walterk82 Walter Kacynski
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: