概述
org.quartz.core.ErrorLogger.schedulerError(QuartzScheduler.java:2358)][org.quartz.core.ErrorLogger]:An error occured while firing trigger'DEFAULT.cronTriggerInterval'
org.quartz.JobPersistenceException:Couldn't update states of blocked triggers: Lock wait timeout exceeded; tryrestarting transaction [See nested exception: java.sql.SQLException: Lock waittimeout exceeded; try restarting transaction]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2950)
atorg.quartz.impl.jdbcjobstore.JobStoreSupport$38.execute(JobStoreSupport.java:2871)
atorg.quartz.impl.jdbcjobstore.JobStoreSupport.executeInNonManagedTXLock(JobStoreSupport.java:3788)
atorg.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2865)
atorg.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:319)
Caused by: java.sql.SQLException: Lock waittimeout exceeded; try restarting transaction
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1074)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4096)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4028)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2490)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2651)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2734)
atcom.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2458)
atcom.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2375)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2359)
atorg.apache.commons.dbcp.DelegatingPreparedStatement.executeUpdate(DelegatingPreparedStatement.java:101)
atorg.quartz.impl.jdbcjobstore.StdJDBCDelegate.updateTriggerStatesForJobFromOtherState(StdJDBCDelegate.java:1695)
atorg.quartz.impl.jdbcjobstore.JobStoreSupport.triggerFired(JobStoreSupport.java:2943)
解决:加上org.quartz.jobStore.txIsolationLevelSerializable=true配置,问题原因由于mysql针对innodB引擎默认的事务隔离级别为“repeatableread”,非集群环境下可以使用:txIsolationLevelReadCommitted=true来设置,但集群环境下使用org.quartz.jobStore.txIsolationLevelSerializable代替txIsolationLevelReadCommitted
最后
以上就是奋斗大树为你收集整理的quartz mysql 异常_quartz运行中的异常的全部内容,希望文章能够帮你解决quartz mysql 异常_quartz运行中的异常所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复