i'm new jsp , quartz scheduling! in project, i'm trying make quartz scheduler continue functioning in case server turned off on ignoring missed jobs.
for this, researched jobpersistence , have modified quartz.properties file following:
org.quartz.threadpool.threadcount=5 org.quartz.jobstore.class = org.quartz.impl.jdbcjobstore.jobstoretx org.quartz.jobstore.tableprefix = qrtz_ org.quartz.jobstore.useproperties = true org.quartz.jobstore.driverdelegateclass = org.quartz.impl.jdbcjobstore.stdjdbcdelegate org.quartz.jobstore.datasource = mydb org.quartz.datasource.mydb.driver = com.mysql.jdbc.driver org.quartz.datasource.mydb.url = jdbc:mysql://localhost:3306/contacts org.quartz.datasource.mydb.user = root org.quartz.datasource.mydb.password = root the web.xml file contains following:
... <listener> <listener-class> org.quartz.ee.servlet.quartzinitializerlistener </listener-class> </listener> ... i've added tables db , when select can see inserted triggers tables.
the trigger built following:
trigger trig = triggerbuilder .newtrigger() .startat(scal.gettime()) .withschedule( simpleschedulebuilder.simpleschedule() .withintervalinminutes(minutes).repeatforever()) .endat(ecal.gettime()).build(); now, when run web app, schedule job , executes. then, turn off tomcat server , start again. prints following error logger:
org.quartz.schedulerconfigexception: failure occured during job recovery. [see nested exception: org.quartz.jobpersistenceexception: couldn't recover jobs: null [see nested exception: java.lang.nullpointerexception]]
i have tried executing following statement once in mysqlworkbench:
update qrtz_triggers set next_fire_time=1 next_fire_time < 0;
now, got new error:
.manage - misfirehandler: error handling misfires: unexpected runtime exception: null
org.quartz.jobpersistenceexception: unexpected runtime exception: null [see nested exception: java.lang.nullpointerexception]
if want me edit , include stacktrace, can that...
you may want use in properties file
org.quartz.scheduler.misfirepolicy = donothing because apparently missed jobs causing problems...
i know old post if have answer please share !
Comments
Post a Comment