org.quartz.JobPersistenceException: Couldn't obtain triggers for job: Index: 0, Size: 0 [See nested exception: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0]

Terracotta | quan | 6 years ago
  1. 0

    Is Quartz Scheduler thread safe?

    Terracotta | 6 years ago | quan
    org.quartz.JobPersistenceException: Couldn't obtain triggers for job: Index: 0, Size: 0 [See nested exception: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0]
  2. 0

    If a trigger is selected as it is being deleted, a _JobPersistenceException_ may be thrown if the following sequence occurs: # (Thread 1) In _StdJDBCDelegate.selectTrigger()_, the trigger is selected, most of the details are retrieved, # (Thread 2) The trigger is deleted, # (Thread 1) In _SimpleTriggerPersistenceDelegate.loadExtendedTriggerProperties()_ the trigger is missing, so an _IllegalStateException_ is thrown. This is somewhat common in our application as one of the first actions when a job starts is to update the user with the next time the job will run, requiring an inspection of all the job's triggers. If the trigger done not repeat, it will be deleted after it fires. {noformat:title=Stack Trace} org.quartz.JobPersistenceException: Couldn't obtain triggers for job: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? [See nested exception: java.lang.IllegalStateException: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?] at com.ze.datamanager.scheduler.QuartzSchedulerWrapper.getNextScheduledStartTime(QuartzSchedulerWrapper.java:331) ~[scheduler-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.QuartzSchedulerManager.getNextScheduledStartTime(QuartzSchedulerManager.java:206) ~[scheduler-4.0-SNAPSHOT.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_21] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_21] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_21] at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21] at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37) ~[guice-3.0.jar:na] at com.sun.proxy.$Proxy128.getNextScheduledStartTime(Unknown Source) ~[na:na] at com.ze.datamanager.execution.manager.ExecutionManager.prePopulateNextScheduledExecution(ExecutionManager.java:403) ~[execution-manager-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.execution.manager.ExecutionManager.executionStarted(ExecutionManager.java:233) ~[execution-manager-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.process.ProcessJob.createAndExecute(ProcessJob.java:257) ~[quartz-process-job-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.process.ProcessJob.execute(ProcessJob.java:238) ~[quartz-process-job-4.0-SNAPSHOT.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ~[quartz-2.1.7.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-2.1.7.jar:na] Caused by: org.quartz.JobPersistenceException: Couldn't obtain triggers for job: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2135) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport$28.execute(JobStoreSupport.java:2121) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3798) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3703) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2118) ~[quartz-2.1.7.jar:na] at org.quartz.core.QuartzScheduler.getTriggersOfJob(QuartzScheduler.java:1423) ~[quartz-2.1.7.jar:na] at org.quartz.impl.StdScheduler.getTriggersOfJob(StdScheduler.java:452) ~[quartz-2.1.7.jar:na] at com.ze.datamanager.scheduler.QuartzSchedulerWrapper.getTriggers(QuartzSchedulerWrapper.java:310) ~[scheduler-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.QuartzSchedulerWrapper.getNextScheduledStartTime(QuartzSchedulerWrapper.java:322) ~[scheduler-4.0-SNAPSHOT.jar:na] ... 13 common frames omitted Caused by: java.lang.IllegalStateException: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.SimpleTriggerPersistenceDelegate.loadExtendedTriggerProperties(SimpleTriggerPersistenceDelegate.java:95) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1801) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggersForJob(StdJDBCDelegate.java:1688) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2132) ~[quartz-2.1.7.jar:na] ... 22 common frames omitted {noformat}

    Terracotta Project Issue Tracker | 3 years ago | Wesley Hartford
    org.quartz.JobPersistenceException: Couldn't obtain triggers for job: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? [See nested exception: java.lang.IllegalStateException: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?]
  3. 0

    If a trigger is selected as it is being deleted, a _JobPersistenceException_ may be thrown if the following sequence occurs: # (Thread 1) In _StdJDBCDelegate.selectTrigger()_, the trigger is selected, most of the details are retrieved, # (Thread 2) The trigger is deleted, # (Thread 1) In _SimpleTriggerPersistenceDelegate.loadExtendedTriggerProperties()_ the trigger is missing, so an _IllegalStateException_ is thrown. This is somewhat common in our application as one of the first actions when a job starts is to update the user with the next time the job will run, requiring an inspection of all the job's triggers. If the trigger done not repeat, it will be deleted after it fires. {noformat:title=Stack Trace} org.quartz.JobPersistenceException: Couldn't obtain triggers for job: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? [See nested exception: java.lang.IllegalStateException: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?] at com.ze.datamanager.scheduler.QuartzSchedulerWrapper.getNextScheduledStartTime(QuartzSchedulerWrapper.java:331) ~[scheduler-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.QuartzSchedulerManager.getNextScheduledStartTime(QuartzSchedulerManager.java:206) ~[scheduler-4.0-SNAPSHOT.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_21] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_21] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_21] at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21] at com.google.inject.internal.DelegatingInvocationHandler.invoke(DelegatingInvocationHandler.java:37) ~[guice-3.0.jar:na] at com.sun.proxy.$Proxy128.getNextScheduledStartTime(Unknown Source) ~[na:na] at com.ze.datamanager.execution.manager.ExecutionManager.prePopulateNextScheduledExecution(ExecutionManager.java:403) ~[execution-manager-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.execution.manager.ExecutionManager.executionStarted(ExecutionManager.java:233) ~[execution-manager-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.process.ProcessJob.createAndExecute(ProcessJob.java:257) ~[quartz-process-job-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.process.ProcessJob.execute(ProcessJob.java:238) ~[quartz-process-job-4.0-SNAPSHOT.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:213) ~[quartz-2.1.7.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) [quartz-2.1.7.jar:na] Caused by: org.quartz.JobPersistenceException: Couldn't obtain triggers for job: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2135) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport$28.execute(JobStoreSupport.java:2121) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3798) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3703) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2118) ~[quartz-2.1.7.jar:na] at org.quartz.core.QuartzScheduler.getTriggersOfJob(QuartzScheduler.java:1423) ~[quartz-2.1.7.jar:na] at org.quartz.impl.StdScheduler.getTriggersOfJob(StdScheduler.java:452) ~[quartz-2.1.7.jar:na] at com.ze.datamanager.scheduler.QuartzSchedulerWrapper.getTriggers(QuartzSchedulerWrapper.java:310) ~[scheduler-4.0-SNAPSHOT.jar:na] at com.ze.datamanager.scheduler.QuartzSchedulerWrapper.getNextScheduledStartTime(QuartzSchedulerWrapper.java:322) ~[scheduler-4.0-SNAPSHOT.jar:na] ... 13 common frames omitted Caused by: java.lang.IllegalStateException: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.SimpleTriggerPersistenceDelegate.loadExtendedTriggerProperties(SimpleTriggerPersistenceDelegate.java:95) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1801) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTriggersForJob(StdJDBCDelegate.java:1688) ~[quartz-2.1.7.jar:na] at org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2132) ~[quartz-2.1.7.jar:na] ... 22 common frames omitted {noformat}

    Terracotta Project Issue Tracker | 3 years ago | Wesley Hartford
    org.quartz.JobPersistenceException: Couldn't obtain triggers for job: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? [See nested exception: java.lang.IllegalStateException: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-f6e66122-1a99-4d83-bd60-0281c257e631' and statement: SELECT * FROM ZE_DM.QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'action-execution-group-run-now' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Problems restoring scheduled reports ...

    oreports | 1 decade ago | spreadshirt
    org.quartz.JobPersistenceException: Couldn't retrieve job because the BLOB couldn't be deserialized: null \[See nested exception: java.io.EOFException\]
  6. 0

    Quartz Users - org.quartz.JobPersistenceException: Couldn't acquire next trigger ??

    nabble.com | 1 year ago
    org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.lang.NullPointerException]

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. org.quartz.JobPersistenceException

      Couldn't obtain triggers for job: Index: 0, Size: 0 [See nested exception: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0]

      at org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob()
    2. quartz
      StdScheduler.getTriggersOfJob
      1. org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2084)
      2. org.quartz.impl.jdbcjobstore.JobStoreSupport$23.execute(JobStoreSupport.java:2070)
      3. org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3711)
      4. org.quartz.impl.jdbcjobstore.JobStoreTX.executeInLock(JobStoreTX.java:93)
      5. org.quartz.impl.jdbcjobstore.JobStoreSupport.executeWithoutLock(JobStoreSupport.java:3616)
      6. org.quartz.impl.jdbcjobstore.JobStoreSupport.getTriggersForJob(JobStoreSupport.java:2067)
      7. org.quartz.core.QuartzScheduler.getTriggersOfJob(QuartzScheduler.java:1270)
      8. org.quartz.impl.StdScheduler.getTriggersOfJob(StdScheduler.java:516)
      8 frames