org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?

Terracotta Project Issue Tracker | Daniel McElroy | 2 years ago
  1. 0

    We are using 4 instances of our application each having a quartz scheduler. We execute about 200 single run SimpleTrigger jobs per hour and we get the exception below about 25 times per hour. It seems to be a race condition between the schedulers and the job still runs as expected on one scheduler and we get the exception on a different scheduler. This is similar to QTZ-386 but possibly another case? Quartz: 2.2.1 Java: jre1.7.0_45 db: mysql {code} 10:13:42.159 [rulesExecutionScheduler_QuartzSchedulerThread] ERROR org.quartz.core.ErrorLogger - An error occurred while scanning for the next triggers to fire. org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2848) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2759) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2757) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3787) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2756) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272) Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1533) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2808) {code} our quartz properties are: {code} quartzProperties.setProperty("org.quartz.scheduler.instanceId", "AUTO"); quartzProperties.setProperty("org.quartz.jobStore.misfireThreshold", "60000"); quartzProperties.setProperty("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX"); quartzProperties.setProperty("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.StdJDBCDelegate"); quartzProperties.setProperty("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS WHERE SCHED_NAME = {1} AND LOCK_NAME = ? FOR UPDATE"); quartzProperties.setProperty("org.quartz.jobStore.tablePrefix", "QRTZ_"); quartzProperties.setProperty("org.quartz.scheduler.skipUpdateCheck", "true"); quartzProperties.setProperty("org.quartz.jobStore.isClustered", "true"); quartzProperties.setProperty("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); quartzProperties.setProperty("org.quartz.threadPool.threadCount", "12"); quartzProperties.setProperty("org.quartz.plugin.triggHistory.class", "org.quartz.plugins.history.LoggingTriggerHistoryPlugin"); quartzProperties.setProperty("org.quartz.plugin.triggHistory.triggerFiredMessage", "Trigger {1}.{0} fired job {6}.{5} at {4, date, yyyy-MM-dd HH:mm:ss}"); quartzProperties.setProperty("org.quartz.plugin.triggHistory.triggerCompleteMessage", "Trigger {1}.{0} completed firing job {6}.{5} at {4, date, yyyy-MM-dd HH:mm:ss} with resulting trigger instruction code {9}"); {code}

    Terracotta Project Issue Tracker | 2 years ago | Daniel McElroy
    org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?
  2. 0

    We are using 4 instances of our application each having a quartz scheduler. We execute about 200 single run SimpleTrigger jobs per hour and we get the exception below about 25 times per hour. It seems to be a race condition between the schedulers and the job still runs as expected on one scheduler and we get the exception on a different scheduler. This is similar to QTZ-386 but possibly another case? Quartz: 2.2.1 Java: jre1.7.0_45 db: mysql {code} 10:13:42.159 [rulesExecutionScheduler_QuartzSchedulerThread] ERROR org.quartz.core.ErrorLogger - An error occurred while scanning for the next triggers to fire. org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2848) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2759) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2757) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3787) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2756) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272) Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ? at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1533) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2808) {code} our quartz properties are: {code} quartzProperties.setProperty("org.quartz.scheduler.instanceId", "AUTO"); quartzProperties.setProperty("org.quartz.jobStore.misfireThreshold", "60000"); quartzProperties.setProperty("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX"); quartzProperties.setProperty("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.StdJDBCDelegate"); quartzProperties.setProperty("org.quartz.jobStore.selectWithLockSQL", "SELECT * FROM {0}LOCKS WHERE SCHED_NAME = {1} AND LOCK_NAME = ? FOR UPDATE"); quartzProperties.setProperty("org.quartz.jobStore.tablePrefix", "QRTZ_"); quartzProperties.setProperty("org.quartz.scheduler.skipUpdateCheck", "true"); quartzProperties.setProperty("org.quartz.jobStore.isClustered", "true"); quartzProperties.setProperty("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool"); quartzProperties.setProperty("org.quartz.threadPool.threadCount", "12"); quartzProperties.setProperty("org.quartz.plugin.triggHistory.class", "org.quartz.plugins.history.LoggingTriggerHistoryPlugin"); quartzProperties.setProperty("org.quartz.plugin.triggHistory.triggerFiredMessage", "Trigger {1}.{0} fired job {6}.{5} at {4, date, yyyy-MM-dd HH:mm:ss}"); quartzProperties.setProperty("org.quartz.plugin.triggHistory.triggerCompleteMessage", "Trigger {1}.{0} completed firing job {6}.{5} at {4, date, yyyy-MM-dd HH:mm:ss} with resulting trigger instruction code {9}"); {code}

    Terracotta Project Issue Tracker | 2 years ago | Daniel McElroy
    org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?
  3. 0

    [QTZ-460] Old QUARTZ-513 issue can occur with OracleDelegate as well - Terracotta Project Issue Tracker

    terracotta.org | 1 year ago
    org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    There was an issue QUARTZ-513 (in the now nonexistent opensymphony jira) that caused the following to occur:{noformat}org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException] at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1508) at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:891) at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3029) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3789) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3809) Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2228) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277) at org.quartz.impl.jdbcjobstore.MSSQLDelegate.getObjectFromBlob(MSSQLDelegate.java:88) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:2132) at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1490) ... 4 more {noformat}see for example an archive here: http://quartz.10975.n7.nabble.com/SimpleTrigger-Couldn-t-retrieve-trigger-null-td6967.html That was fixed in StdJDBCDelegate and others by adding a check for zero length: https://fisheye.terracotta.org/changelog/Quartz?cs=737 However nothing was done about it in the OracleDelegate which is where it now occurred for us:{noformat}org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: null [See nested exception: org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException]] at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2848) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2759) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2757) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3787) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2756) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272) Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException] at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1533) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2808) ... 5 more Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2298) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2767) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:796) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:294) at org.quartz.impl.jdbcjobstore.oracle.OracleDelegate.getObjectFromBlob(OracleDelegate.java:139) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1780) at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1531) ... 6 more{noformat} Please fix that in OracleDelegate as well.

    Terracotta Project Issue Tracker | 1 year ago | seetha Lakshmi
    org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException]
  6. 0

    There was an issue QUARTZ-513 (in the now nonexistent opensymphony jira) that caused the following to occur:{noformat}org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException] at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1508) at org.quartz.impl.jdbcjobstore.JobStoreSupport.recoverMisfiredJobs(JobStoreSupport.java:891) at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3029) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3789) at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3809) Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2228) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2694) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:761) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:277) at org.quartz.impl.jdbcjobstore.MSSQLDelegate.getObjectFromBlob(MSSQLDelegate.java:88) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:2132) at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1490) ... 4 more {noformat}see for example an archive here: http://quartz.10975.n7.nabble.com/SimpleTrigger-Couldn-t-retrieve-trigger-null-td6967.html That was fixed in StdJDBCDelegate and others by adding a check for zero length: https://fisheye.terracotta.org/changelog/Quartz?cs=737 However nothing was done about it in the OracleDelegate which is where it now occurred for us:{noformat}org.quartz.JobPersistenceException: Couldn't acquire next trigger: Couldn't retrieve trigger: null [See nested exception: org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException]] at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2848) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2759) at org.quartz.impl.jdbcjobstore.JobStoreSupport$40.execute(JobStoreSupport.java:2757) at org.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3787) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTriggers(JobStoreSupport.java:2756) at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:272) Caused by: org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException] at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1533) at org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2808) ... 5 more Caused by: java.io.EOFException at java.io.ObjectInputStream$PeekInputStream.readFully(ObjectInputStream.java:2298) at java.io.ObjectInputStream$BlockDataInputStream.readShort(ObjectInputStream.java:2767) at java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:796) at java.io.ObjectInputStream.<init>(ObjectInputStream.java:294) at org.quartz.impl.jdbcjobstore.oracle.OracleDelegate.getObjectFromBlob(OracleDelegate.java:139) at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.selectTrigger(StdJDBCDelegate.java:1780) at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1531) ... 6 more{noformat} Please fix that in OracleDelegate as well.

    Terracotta Project Issue Tracker | 2 years ago | Petr H
    org.quartz.JobPersistenceException: Couldn't retrieve trigger: null [See nested exception: java.io.EOFException]

    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 retrieve trigger: No record found for selection of Trigger with key: 'DEFAULT.6da64b5bd2ee-2cc217ab-58da-4061-bf71-276e1168942d' and statement: SELECT * FROM QRTZ_SIMPLE_TRIGGERS WHERE SCHED_NAME = 'rulesExecutionScheduler' AND TRIGGER_NAME = ? AND TRIGGER_GROUP = ?

      at org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger()
    2. quartz
      JobStoreSupport.acquireNextTrigger
      1. org.quartz.impl.jdbcjobstore.JobStoreSupport.retrieveTrigger(JobStoreSupport.java:1533)
      2. org.quartz.impl.jdbcjobstore.JobStoreSupport.acquireNextTrigger(JobStoreSupport.java:2808)
      2 frames