Quartz StdSchedulerFactory() instantiation hangs in Java
up vote
1
down vote
favorite
I've searched through all of the related Quartz Scheduler questions here and haven't found anyone else having an issue like the one I'm seeing. This question is not about issues with schedules not running correctly or jobs not being triggered which is what I've mostly found. I seem to be entering into a hung state when I simply try to instantiate a StdSchedulerFactory object.
if(_logger.isInfoEnabled())
_logger.info("made it here 01");
SchedulerFactory schedFact = new StdSchedulerFactory();
if(_logger.isInfoEnabled())
_logger.info("made it here 02");
_sched = schedFact.getScheduler();
This block of code is inside of a synchronized block that also checks to see if _sched (which is declared as org.quartz.Scheduler) is currently running. If we enter the synchronized block and find that a Scheduler is currently running, we shut it down.
The code seems to be hanging on the actual instantiation of the StdSchedulerFactor() object. "made it here 01" prints out, however, "made it here 02" never prints out.
This code works fine on my local machine and on a lab environment. When deployed to a client server, it fails.
Couple of notes
- This code is inside a try/catch block. No error is ever thrown
- I'm using quartz 2.2.1 (we have to stay on jdk 1.6)
- The deployed code is working fine on several environments, just failing on one
- Again, no errors reported (I was expecting to maybe find a ClassDefNotFound error somewhere in my logs...but nothing)
On my local environment I get the following printed out in my catalina.log file.
[2018-11-11 07:23:07,456] [INFO] [QuartzScheduler.java:694] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:613] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED paused.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:771] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.]
[2018-11-11 07:23:07,459] [INFO] [StdSchedulerFactory.java:1184] [Using
default implementation for ThreadExecutor]
[2018-11-11 07:23:07,459] [INFO] [SimpleThreadPool.java:268] [Job execution
threads will use class loader of thread: pool-6-thread-1]
[2018-11-11 07:23:07,462] [INFO] [SchedulerSignalerImpl.java:61]
[Initialized Scheduler Signaller of type: class
org.quartz.core.SchedulerSignalerImpl]
[2018-11-11 07:23:07,462] [INFO] [QuartzScheduler.java:240] [Quartz
Scheduler v.2.2.1 created.]
[2018-11-11 07:23:07,463] [INFO] [RAMJobStore.java:155] [RAMJobStore
initialized.]
[2018-11-11 07:23:07,463] [INFO] [QuartzScheduler.java:305] [Scheduler meta-
data: Quartz Scheduler (v2.2.1) 'DefaultQuartzScheduler' with instanceId
'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.
]
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1339] [Quartz
scheduler 'DefaultQuartzScheduler' initialized from default resource file in
Quartz package: 'quartz.properties']
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1343] [Quartz
scheduler version: 2.2.1]
Again, that printout is from my local environment that is working. On the client environment though, that never gets printed. No errors are ever printed though either.
I can include more of the overall code if needed, however, since this code works on every other environment I've tried it on, I'm wondering if there is some environment setting that I may need to look for?
java quartz-scheduler jdk1.6
add a comment |
up vote
1
down vote
favorite
I've searched through all of the related Quartz Scheduler questions here and haven't found anyone else having an issue like the one I'm seeing. This question is not about issues with schedules not running correctly or jobs not being triggered which is what I've mostly found. I seem to be entering into a hung state when I simply try to instantiate a StdSchedulerFactory object.
if(_logger.isInfoEnabled())
_logger.info("made it here 01");
SchedulerFactory schedFact = new StdSchedulerFactory();
if(_logger.isInfoEnabled())
_logger.info("made it here 02");
_sched = schedFact.getScheduler();
This block of code is inside of a synchronized block that also checks to see if _sched (which is declared as org.quartz.Scheduler) is currently running. If we enter the synchronized block and find that a Scheduler is currently running, we shut it down.
The code seems to be hanging on the actual instantiation of the StdSchedulerFactor() object. "made it here 01" prints out, however, "made it here 02" never prints out.
This code works fine on my local machine and on a lab environment. When deployed to a client server, it fails.
Couple of notes
- This code is inside a try/catch block. No error is ever thrown
- I'm using quartz 2.2.1 (we have to stay on jdk 1.6)
- The deployed code is working fine on several environments, just failing on one
- Again, no errors reported (I was expecting to maybe find a ClassDefNotFound error somewhere in my logs...but nothing)
On my local environment I get the following printed out in my catalina.log file.
[2018-11-11 07:23:07,456] [INFO] [QuartzScheduler.java:694] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:613] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED paused.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:771] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.]
[2018-11-11 07:23:07,459] [INFO] [StdSchedulerFactory.java:1184] [Using
default implementation for ThreadExecutor]
[2018-11-11 07:23:07,459] [INFO] [SimpleThreadPool.java:268] [Job execution
threads will use class loader of thread: pool-6-thread-1]
[2018-11-11 07:23:07,462] [INFO] [SchedulerSignalerImpl.java:61]
[Initialized Scheduler Signaller of type: class
org.quartz.core.SchedulerSignalerImpl]
[2018-11-11 07:23:07,462] [INFO] [QuartzScheduler.java:240] [Quartz
Scheduler v.2.2.1 created.]
[2018-11-11 07:23:07,463] [INFO] [RAMJobStore.java:155] [RAMJobStore
initialized.]
[2018-11-11 07:23:07,463] [INFO] [QuartzScheduler.java:305] [Scheduler meta-
data: Quartz Scheduler (v2.2.1) 'DefaultQuartzScheduler' with instanceId
'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.
]
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1339] [Quartz
scheduler 'DefaultQuartzScheduler' initialized from default resource file in
Quartz package: 'quartz.properties']
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1343] [Quartz
scheduler version: 2.2.1]
Again, that printout is from my local environment that is working. On the client environment though, that never gets printed. No errors are ever printed though either.
I can include more of the overall code if needed, however, since this code works on every other environment I've tried it on, I'm wondering if there is some environment setting that I may need to look for?
java quartz-scheduler jdk1.6
Follow up question to my question above. Is it possible that it might be better to use Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler() to get a Scheduler object rather than constantly instantiating a new StdSchedulerFactory() and then retrieving a scheduler from that new object?
– Jason Schade
Nov 12 at 20:38
add a comment |
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I've searched through all of the related Quartz Scheduler questions here and haven't found anyone else having an issue like the one I'm seeing. This question is not about issues with schedules not running correctly or jobs not being triggered which is what I've mostly found. I seem to be entering into a hung state when I simply try to instantiate a StdSchedulerFactory object.
if(_logger.isInfoEnabled())
_logger.info("made it here 01");
SchedulerFactory schedFact = new StdSchedulerFactory();
if(_logger.isInfoEnabled())
_logger.info("made it here 02");
_sched = schedFact.getScheduler();
This block of code is inside of a synchronized block that also checks to see if _sched (which is declared as org.quartz.Scheduler) is currently running. If we enter the synchronized block and find that a Scheduler is currently running, we shut it down.
The code seems to be hanging on the actual instantiation of the StdSchedulerFactor() object. "made it here 01" prints out, however, "made it here 02" never prints out.
This code works fine on my local machine and on a lab environment. When deployed to a client server, it fails.
Couple of notes
- This code is inside a try/catch block. No error is ever thrown
- I'm using quartz 2.2.1 (we have to stay on jdk 1.6)
- The deployed code is working fine on several environments, just failing on one
- Again, no errors reported (I was expecting to maybe find a ClassDefNotFound error somewhere in my logs...but nothing)
On my local environment I get the following printed out in my catalina.log file.
[2018-11-11 07:23:07,456] [INFO] [QuartzScheduler.java:694] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:613] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED paused.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:771] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.]
[2018-11-11 07:23:07,459] [INFO] [StdSchedulerFactory.java:1184] [Using
default implementation for ThreadExecutor]
[2018-11-11 07:23:07,459] [INFO] [SimpleThreadPool.java:268] [Job execution
threads will use class loader of thread: pool-6-thread-1]
[2018-11-11 07:23:07,462] [INFO] [SchedulerSignalerImpl.java:61]
[Initialized Scheduler Signaller of type: class
org.quartz.core.SchedulerSignalerImpl]
[2018-11-11 07:23:07,462] [INFO] [QuartzScheduler.java:240] [Quartz
Scheduler v.2.2.1 created.]
[2018-11-11 07:23:07,463] [INFO] [RAMJobStore.java:155] [RAMJobStore
initialized.]
[2018-11-11 07:23:07,463] [INFO] [QuartzScheduler.java:305] [Scheduler meta-
data: Quartz Scheduler (v2.2.1) 'DefaultQuartzScheduler' with instanceId
'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.
]
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1339] [Quartz
scheduler 'DefaultQuartzScheduler' initialized from default resource file in
Quartz package: 'quartz.properties']
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1343] [Quartz
scheduler version: 2.2.1]
Again, that printout is from my local environment that is working. On the client environment though, that never gets printed. No errors are ever printed though either.
I can include more of the overall code if needed, however, since this code works on every other environment I've tried it on, I'm wondering if there is some environment setting that I may need to look for?
java quartz-scheduler jdk1.6
I've searched through all of the related Quartz Scheduler questions here and haven't found anyone else having an issue like the one I'm seeing. This question is not about issues with schedules not running correctly or jobs not being triggered which is what I've mostly found. I seem to be entering into a hung state when I simply try to instantiate a StdSchedulerFactory object.
if(_logger.isInfoEnabled())
_logger.info("made it here 01");
SchedulerFactory schedFact = new StdSchedulerFactory();
if(_logger.isInfoEnabled())
_logger.info("made it here 02");
_sched = schedFact.getScheduler();
This block of code is inside of a synchronized block that also checks to see if _sched (which is declared as org.quartz.Scheduler) is currently running. If we enter the synchronized block and find that a Scheduler is currently running, we shut it down.
The code seems to be hanging on the actual instantiation of the StdSchedulerFactor() object. "made it here 01" prints out, however, "made it here 02" never prints out.
This code works fine on my local machine and on a lab environment. When deployed to a client server, it fails.
Couple of notes
- This code is inside a try/catch block. No error is ever thrown
- I'm using quartz 2.2.1 (we have to stay on jdk 1.6)
- The deployed code is working fine on several environments, just failing on one
- Again, no errors reported (I was expecting to maybe find a ClassDefNotFound error somewhere in my logs...but nothing)
On my local environment I get the following printed out in my catalina.log file.
[2018-11-11 07:23:07,456] [INFO] [QuartzScheduler.java:694] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutting down.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:613] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED paused.]
[2018-11-11 07:23:07,457] [INFO] [QuartzScheduler.java:771] [Scheduler
DefaultQuartzScheduler_$_NON_CLUSTERED shutdown complete.]
[2018-11-11 07:23:07,459] [INFO] [StdSchedulerFactory.java:1184] [Using
default implementation for ThreadExecutor]
[2018-11-11 07:23:07,459] [INFO] [SimpleThreadPool.java:268] [Job execution
threads will use class loader of thread: pool-6-thread-1]
[2018-11-11 07:23:07,462] [INFO] [SchedulerSignalerImpl.java:61]
[Initialized Scheduler Signaller of type: class
org.quartz.core.SchedulerSignalerImpl]
[2018-11-11 07:23:07,462] [INFO] [QuartzScheduler.java:240] [Quartz
Scheduler v.2.2.1 created.]
[2018-11-11 07:23:07,463] [INFO] [RAMJobStore.java:155] [RAMJobStore
initialized.]
[2018-11-11 07:23:07,463] [INFO] [QuartzScheduler.java:305] [Scheduler meta-
data: Quartz Scheduler (v2.2.1) 'DefaultQuartzScheduler' with instanceId
'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support
persistence. and is not clustered.
]
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1339] [Quartz
scheduler 'DefaultQuartzScheduler' initialized from default resource file in
Quartz package: 'quartz.properties']
[2018-11-11 07:23:07,463] [INFO] [StdSchedulerFactory.java:1343] [Quartz
scheduler version: 2.2.1]
Again, that printout is from my local environment that is working. On the client environment though, that never gets printed. No errors are ever printed though either.
I can include more of the overall code if needed, however, since this code works on every other environment I've tried it on, I'm wondering if there is some environment setting that I may need to look for?
java quartz-scheduler jdk1.6
java quartz-scheduler jdk1.6
asked Nov 12 at 20:00
Jason Schade
62
62
Follow up question to my question above. Is it possible that it might be better to use Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler() to get a Scheduler object rather than constantly instantiating a new StdSchedulerFactory() and then retrieving a scheduler from that new object?
– Jason Schade
Nov 12 at 20:38
add a comment |
Follow up question to my question above. Is it possible that it might be better to use Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler() to get a Scheduler object rather than constantly instantiating a new StdSchedulerFactory() and then retrieving a scheduler from that new object?
– Jason Schade
Nov 12 at 20:38
Follow up question to my question above. Is it possible that it might be better to use Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler() to get a Scheduler object rather than constantly instantiating a new StdSchedulerFactory() and then retrieving a scheduler from that new object?
– Jason Schade
Nov 12 at 20:38
Follow up question to my question above. Is it possible that it might be better to use Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler() to get a Scheduler object rather than constantly instantiating a new StdSchedulerFactory() and then retrieving a scheduler from that new object?
– Jason Schade
Nov 12 at 20:38
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53269266%2fquartz-stdschedulerfactory-instantiation-hangs-in-java%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Follow up question to my question above. Is it possible that it might be better to use Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler() to get a Scheduler object rather than constantly instantiating a new StdSchedulerFactory() and then retrieving a scheduler from that new object?
– Jason Schade
Nov 12 at 20:38