java.lang.IllegalArgumentException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by Martin Wirth,
  • 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.
    via by Martin Wirth,
  • Randomizing Thread sleep
    via Stack Overflow by IUnknown
    ,
  • OSRS interact method
    via GitHub by Dequeued
    ,
  • bank#open() throws error
    via GitHub by Submotion
    ,
  • Negative Timeout value
    via GitHub by njewsbury
    ,
    • 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]

    Users with the same issue

    batwalrus76
    9 times, last one,
    poroszd
    1 times, last one,