Uploaded image for project: 'jBPM'
  1. jBPM
  2. JBPM-4471

get NPE on restart when timer attempts to schedule jobs

    Details

    • Steps to Reproduce:
      Hide

      Not sure how I ended up in this situation, but, to reproduce it, ThreadPoolScheduler.scheduleJob asks the trigger for trigger.hasNextFireTime(). If it returns null, then this situation should occur.

      Show
      Not sure how I ended up in this situation, but, to reproduce it, ThreadPoolScheduler.scheduleJob asks the trigger for trigger.hasNextFireTime(). If it returns null, then this situation should occur.

      Description

      When GlobalTimerService runs when initializing the session, it attempts to schedule a job (line 88):

       GlobalJobHandle jobHandle = (GlobalJobHandle) this.schedulerService.scheduleJob(job, ctx, trigger); jobHandles.add(jobHandle);
      

      In my case, the jobHandle returned is null, so a null value is added to the list. Subsequently, it tries to schedule a job, and the loop at line 80 is run:

       for (GlobalJobHandle handle : jobHandles) {
                          long timerId = handle.getTimerId();
                          if (timerId == processCtx.getTimer().getId()) {
                              // this timer job is already registered
                              return handle;
                          }
                      }
      

      since handle is null, the first line of the for loop fails with a NPE.

      Not sure how to get myself out of this situation, without deleting all my data.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                swiderski.maciej Maciej Swiderski
                Reporter:
                jblinick Josh B
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: