java - Database error recovering from misfires Qualtz -
i configured quartz use scheduled jobs database. when start scheduler with:
try { // grab scheduler instance factory scheduler scheduler = stdschedulerfactory.getdefaultscheduler(); // , start off scheduler.start(); scheduler.shutdown(); } catch (exception se) { log.log(loglevel.error, se.getmessage()); }
the config file of project looks like:
org.quartz.scheduler.instancename = databasescheduler org.quartz.scheduler.skipupdatecheck = true org.quartz.threadpool.threadcount = 3 org.quartz.jobstore.class = org.quartz.impl.jdbcjobstore.jobstoretx org.quartz.jobstore.driverdelegateclass = org.quartz.impl.jdbcjobstore.mssqldelegate org.quartz.datasource.mydb.driver = com.microsoft.sqlserver.jdbc.sqlserverdriver org.quartz.datasource.mydb.url = jdbc:sqlserver://server:1433;databasename=schedules org.quartz.datasource.mydb.user = sa org.quartz.datasource.mydb.password = password org.quartz.datasource.mydb.maxconnections = 2 org.quartz.jobstore.tableprefix = qrtz_ org.quartz.jobstore.datasource = mydb org.quartz.scheduler.misfirepolicy = donothing
the error got is:
org.quartz.jobpersistenceexception: database error recovering misfires. [see nested exception: java.sql.sqlexception: sqlexception provoked following failure: java.lang.interruptedexception] @ org.quartz.impl.jdbcjobstore.jobstoresupport.dorecovermisfires(jobstoresupport.java:3213) @ org.quartz.impl.jdbcjobstore.jobstoresupport$misfirehandler.manage(jobstoresupport.java:3951) @ org.quartz.impl.jdbcjobstore.jobstoresupport$misfirehandler.run(jobstoresupport.java:3972) caused by: java.sql.sqlexception: sqlexception provoked following failure: java.lang.interruptedexception @ com.mchange.v2.sql.sqlutils.tosqlexception(sqlutils.java:106) @ com.mchange.v2.sql.sqlutils.tosqlexception(sqlutils.java:65) @ com.mchange.v2.sql.sqlutils.tosqlexception(sqlutils.java:62) @ com.mchange.v2.c3p0.stmt.googoostatementcache.acquirestatement(googoostatementcache.java:562) @ com.mchange.v2.c3p0.stmt.googoostatementcache.checkoutstatement(googoostatementcache.java:168) @ com.mchange.v2.c3p0.impl.newpooledconnection.checkoutstatement(newpooledconnection.java:234) @ com.mchange.v2.c3p0.impl.newproxyconnection.preparestatement(newproxyconnection.java:199) @ sun.reflect.nativemethodaccessorimpl.invoke0(native method) @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:62) @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43) @ java.lang.reflect.method.invoke(method.java:498) @ org.quartz.impl.jdbcjobstore.attributerestoringconnectioninvocationhandler.invoke(attributerestoringconnectioninvocationhandler.java:73) @ com.sun.proxy.$proxy3.preparestatement(unknown source) @ org.quartz.impl.jdbcjobstore.stdjdbcdelegate.countmisfiredtriggersinstate(stdjdbcdelegate.java:390) @ org.quartz.impl.jdbcjobstore.jobstoresupport.dorecovermisfires(jobstoresupport.java:3192) ... 2 more
can me error? have looked @ stackoverflow post. without luck. i'm using quartz 2.2.3. when database tables empty got error.
found issue. in source code scheduler start , close scheduler. in time nothing can scheduled , start of scheduler not finished before close has been called. removing close call worked correctly.
Comments
Post a Comment