java.lang.IllegalArgumentException: timeout value is negative

Terracotta Project Issue Tracker | Martin Wirth | 2 years ago
  1. 0

    There is a Bug in the QuartzScheduler-Class that does not handle the dbFailureRetryInterval-Parameter correctly. Due to company policy im not allowed to provide a patch-file but i hope the analysis below will be enought to find the corresponding lines of code. When having some temporary databse connectivity-errors Quartz logs those events (see below) and normaly handles them savely after backing up several seconds. {code} 2014-06-07 02:02:00,346 [<LoggerName>] ERROR org.quartz.core.ErrorLogger - An error occured while marking executed job complete. job= 'TimeTriggerGroup.TimeTriggerId_3429' org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'triggerDataSourceNonTX': org.postgresql.util.PSQLException: The connection attempt failed. {code} But given you created a QuartzScheduler instance using the DirectSchedulerFactory when * the above descibed error occured when saving to the database * and you did not explicitly configure the dbFailureRetryInterval-Parameter in the method {code}createScheduler(String schedulerName, String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore) {code} then * the following exception will occur: {code} 2014-06-07 02:02:00,347 [<LoggerName>] ERROR org.quartz.simpl.SimpleThreadPool - Error while executing the Runnable: java.lang.IllegalArgumentException: timeout value is negative at java.lang.Thread.sleep(Native Method) ~[na:1.7.0_51] at org.quartz.core.JobRunShell.completeTriggerRetryLoop(JobRunShell.java:399) ~[quartz-2.1.3.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:286) ~[quartz-2.1.3.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) ~[quartz-2.1.3.jar:na] {code} The cause of the error lies in the QuartzScheduler class that internally directly uses the default value {{-1}} provided by the DirectSchedulerFactory, causing the exception when Quartz retries to save its state to the database. The bug is not fixed in 2.1.x versions after 2.1.3. In 2.2.x the bug was fixed with Changeset [https://fisheye.terracotta.org/changelog/Quartz?cs=2367] where the dbFailureRetryInterval is no longer provided by the QuartzScheduler.

    Terracotta Project Issue Tracker | 2 years ago | Martin Wirth
    java.lang.IllegalArgumentException: timeout value is negative
  2. 0

    There is a Bug in the QuartzScheduler-Class that does not handle the dbFailureRetryInterval-Parameter correctly. Due to company policy im not allowed to provide a patch-file but i hope the analysis below will be enought to find the corresponding lines of code. When having some temporary databse connectivity-errors Quartz logs those events (see below) and normaly handles them savely after backing up several seconds. {code} 2014-06-07 02:02:00,346 [<LoggerName>] ERROR org.quartz.core.ErrorLogger - An error occured while marking executed job complete. job= 'TimeTriggerGroup.TimeTriggerId_3429' org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'triggerDataSourceNonTX': org.postgresql.util.PSQLException: The connection attempt failed. {code} But given you created a QuartzScheduler instance using the DirectSchedulerFactory when * the above descibed error occured when saving to the database * and you did not explicitly configure the dbFailureRetryInterval-Parameter in the method {code}createScheduler(String schedulerName, String schedulerInstanceId, ThreadPool threadPool, JobStore jobStore) {code} then * the following exception will occur: {code} 2014-06-07 02:02:00,347 [<LoggerName>] ERROR org.quartz.simpl.SimpleThreadPool - Error while executing the Runnable: java.lang.IllegalArgumentException: timeout value is negative at java.lang.Thread.sleep(Native Method) ~[na:1.7.0_51] at org.quartz.core.JobRunShell.completeTriggerRetryLoop(JobRunShell.java:399) ~[quartz-2.1.3.jar:na] at org.quartz.core.JobRunShell.run(JobRunShell.java:286) ~[quartz-2.1.3.jar:na] at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557) ~[quartz-2.1.3.jar:na] {code} The cause of the error lies in the QuartzScheduler class that internally directly uses the default value {{-1}} provided by the DirectSchedulerFactory, causing the exception when Quartz retries to save its state to the database. The bug is not fixed in 2.1.x versions after 2.1.3. In 2.2.x the bug was fixed with Changeset [https://fisheye.terracotta.org/changelog/Quartz?cs=2367] where the dbFailureRetryInterval is no longer provided by the QuartzScheduler.

    Terracotta Project Issue Tracker | 2 years ago | Martin Wirth
    java.lang.IllegalArgumentException: timeout value is negative
  3. 0

    OSRS interact method

    GitHub | 3 years ago | Dequeued
    java.lang.IllegalArgumentException: timeout value is negative
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    bank#open() throws error

    GitHub | 3 years ago | Submotion
    java.lang.IllegalArgumentException: timeout value is negative
  6. 0

    Negative Timeout value

    GitHub | 2 years ago | njewsbury
    java.lang.IllegalArgumentException: timeout value is negative

  1. poroszd 1 times, last 10 months ago
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. java.lang.IllegalArgumentException

    timeout value is negative

    at java.lang.Thread.sleep()
  2. Java RT
    Thread.sleep
    1. java.lang.Thread.sleep(Native Method)[na:1.7.0_51]
    1 frame
  3. quartz
    SimpleThreadPool$WorkerThread.run
    1. org.quartz.core.JobRunShell.completeTriggerRetryLoop(JobRunShell.java:399)[quartz-2.1.3.jar:na]
    2. org.quartz.core.JobRunShell.run(JobRunShell.java:286)[quartz-2.1.3.jar:na]
    3. org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:557)[quartz-2.1.3.jar:na]
    3 frames