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

java.lang.ArrayIndexOutOfBoundsException during CRON trigger configuration

XMLWordPrintable

      Our team has a lot of GitHub projects, that should have PullRequest, Release and Nightly jobs and groovy shared library to manage build process. We have tried to manage CRON trigger from shared library like this:

      org.jenkinsci.plugins.workflow.job.WorkflowJob job = currentBuild.getRawBuild().getParent()
      String spec = "H H(0-4) * * *"
      hudson.triggers.TimerTrigger newCron = new hudson.triggers.TimerTrigger(spec)
      newCron.start(job, true)
      job.addTrigger(newCron)

      For some time (month or more), this solution has worked good, but sometimes our jobs start to fail with such error:

      java.lang.ArrayIndexOutOfBoundsException: Index -1 out of bounds for length 10
      // (Full stack trace can be found in attachments)

      When this error happened, we have tried to manage CRON trigger configuration from Jenkins UI and we have got similar error while applying new CRON trigger configuration (Log from Jenkins container can be found in attachments).
      Only Jenkins reboot helped to solve this issue, but after one month it happened again.

      How we can permanently this error? What can be the root cause? Is it our mistake, or a Pipeline Trigger bug?

        1. Jenkins_Pod.log
          39 kB
          Vladyslav Kovalov
        2. Job_Stack_Trace.log
          5 kB
          Vladyslav Kovalov

            Unassigned Unassigned
            vladyslav_kovalov Vladyslav Kovalov
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: