[ 
https://issues.apache.org/jira/browse/CAMEL-9185?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sambit Mohanty updated CAMEL-9185:
----------------------------------
    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]

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



  was:
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 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]






> Quartz Scheduler unable to recover from a database outage
> ---------------------------------------------------------
>
>                 Key: CAMEL-9185
>                 URL: https://issues.apache.org/jira/browse/CAMEL-9185
>             Project: Camel
>          Issue Type: Bug
>            Reporter: Sambit Mohanty
>
> 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]
> *************************************************************************************************************************************************************



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to