michaelklishin / quartz-mongodb

A MongoDB-based store for the Quartz scheduler. This fork strives to be as feature complete as possible. Originally by MuleSoft.
Other
248 stars 203 forks source link

NoSuchMethodException: No setter for property 'isClustered' #112

Closed connollyst closed 8 years ago

connollyst commented 8 years ago

Hi there,

Thanks so much for adding clustering support. I'm having trouble getting it to work though. Using 2.0.0-rc1 I've followed the README.md and can set up the MongoDBJobStore, no problem. Everything works great.

org.quartz.threadPool.threadCount=1

org.quartz.jobStore.class=com.novemberain.quartz.mongodb.MongoDBJobStore
org.quartz.jobStore.mongoUri=mongodb://localhost/helloworld
org.quartz.jobStore.dbName=helloworld
org.quartz.jobStore.collectionPrefix=mycol

On startup Quartz reports..

  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 1 threads.
  Using job-store 'com.novemberain.quartz.mongodb.MongoDBJobStore' - which supports persistence. and is not clustered.

Now I add in the clustering configuration..

org.quartz.jobStore.isClustered=true
org.quartz.scheduler.instanceId=AUTO
org.quartz.scheduler.instanceName=helloworld

And get the following:

Caused by: org.quartz.SchedulerException: JobStore class 'com.novemberain.quartz.mongodb.MongoDBJobStore' props could not be configured.
    at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:874)
    at org.quartz.impl.StdSchedulerFactory.getScheduler(StdSchedulerFactory.java:1502)
    at org.springframework.scheduling.quartz.SchedulerFactoryBean.createScheduler(SchedulerFactoryBean.java:597)
    at org.springframework.scheduling.quartz.SchedulerFactoryBean.afterPropertiesSet(SchedulerFactoryBean.java:480)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1633)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1570)
    ... 71 common frames omitted
Caused by: java.lang.NoSuchMethodException: No setter for property 'isClustered'
    at org.quartz.impl.StdSchedulerFactory.setBeanProps(StdSchedulerFactory.java:1390)
    at org.quartz.impl.StdSchedulerFactory.instantiate(StdSchedulerFactory.java:872)
    ... 76 common frames omitted

I can't see the source code because it's not up in clojars, but from the compiled source I can see that, indeed, there is a getter but no setter for clustering.

    public long getEstimatedTimeToReleaseAndAcquireTrigger() { /* compiled code */ }

    public boolean isClustered() { /* compiled code */ }

    public void storeJobAndTrigger(org.quartz.JobDetail jobDetail, org.quartz.spi.OperableTrigger operableTrigger) throws org.quartz.JobPersistenceException { /* compiled code */ }

2.0.0-rc2 looks like it has this function, can you deploy it to clojars?

Thanks, Sean

michaelklishin commented 8 years ago

RC1 doesn't have clustering support. I will deploy an update soon.

connollyst commented 8 years ago

Wonderful, thanks Michael!

connollyst commented 8 years ago

Hi Michael,

Hate to nag, but is there a time frame for this?

Thanks! Sean

michaelklishin commented 8 years ago

@connollyst done.

connollyst commented 8 years ago

Excellent, thanks so much.

pwojnowski commented 8 years ago

Greetings, I've had a highly enjoyable experience working with that information, you can find more interesting stuff here http://quality.greatmalaysia.com/e4moclqz esperanto

534