Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

threadpool class not specified error

I got an error after initalized StdSchedulerFactory while getting scheduler object.

init method failed; nested exception is org.quartz.SchedulerException: ThreadPool class not specified.

code is :

        Properties properties = new Properties();
    properties.put("org.quartz.scheduler.instanceName", name);
    properties.put("org.quartz.threadPool.threadCount", String.valueOf(numberOfThreads));
    properties.put("org.quartz.scheduler.skipUpdateCheck", "true");

    StdSchedulerFactory stdSchedulerFactory = new StdSchedulerFactory();
    stdSchedulerFactory.initialize(properties);
    Scheduler scheduler = stdSchedulerFactory.getScheduler();
    scheduler.start();

Could you suggest any solution?

like image 755
Ugur Artun Avatar asked Nov 22 '25 15:11

Ugur Artun


1 Answers

You probably need at least this:

properties.put("org.quartz.threadPool.class", "org.quartz.simpl.SimpleThreadPool");

You might need to look at some quartz examples and configure more properties.

like image 166
Lee Meador Avatar answered Nov 24 '25 03:11

Lee Meador



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!