Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-9185

Quartz Scheduler unable to recover from a database outage

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Invalid
    • None
    • None
    • None
    • None
    • Unknown

    Description

      Hi,

      Currently we have an implementation of Camel 2.12.1 and quartz .
      The job states are being persisted in the database using the trigger tables.

      After a database outage the scheduler is not able to revive and throws jdbc connection exception. I have provided a stack trace below. Please advise what could be the resolution steps.

      ***********************************************************************************************************************************************************

      QuartzScheduler_CSAClusteredScheduler-_ClusterManager ERROR o.q.i.j.JobStoreTX ClusterManager: Error managing cluster: Failed to obtain DB connection from data source 'csaDS': java.sql.SQLException: Could not retrieve datasource via JNDI url 'java:comp/env/jdbc/CSA' javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names.

      org.quartz.JobPersistenceException: Failed to obtain DB connection from data source 'csaDS': java.sql.SQLException: Could not retrieve datasource via JNDI url 'java:comp/env/jdbc/CSA' javax.naming.ConfigurationException: A JNDI operation on a "java:" name cannot be completed because the server runtime is not able to associate the operation's thread with any J2EE application component. This condition can occur when the JNDI client using the "java:" name is not executed on the thread of a server application request. Make sure that a J2EE application does not execute JNDI operations on "java:" names within static code blocks or in threads created by that J2EE application. Such code does not necessarily run on the thread of a server application request and therefore is not supported by JNDI operations on "java:" names.

      at org.quartz.impl.jdbcjobstore.JobStoreSupport.getConnection(JobStoreSupport.java:777) ~[quartz-2.2.0.jar:na]

      at org.quartz.impl.jdbcjobstore.JobStoreTX.getNonManagedTXConnection(JobStoreTX.java:71) ~[quartz-2.2.0.jar:na]

      at org.quartz.impl.jdbcjobstore.JobStoreSupport.doCheckin(JobStoreSupport.java:3213) ~[quartz-2.2.0.jar:na]

      at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.manage(JobStoreSupport.java:3836) [quartz-2.2.0.jar:na]

      at org.quartz.impl.jdbcjobstore.JobStoreSupport$ClusterManager.run(JobStoreSupport.java:3873) [quartz-2.2.0.jar:na]

      *************************************************************************************************************************************************************

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            mail2sambit Sambit Mohanty
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: