0
데이터베이스에서 예약 된 작업을 사용하도록 Quartz를 구성했습니다.실화로 회복 된 데이터베이스 오류 Qualtz
같이try {
// Grab the Scheduler instance from the Factory
Scheduler scheduler = StdSchedulerFactory.getDefaultScheduler();
// and start it off
scheduler.start();
scheduler.shutdown();
} catch (Exception se) {
Log.log(LogLevel.ERROR, se.getMessage());
}
프로젝트의 설정 파일이 보인다 :
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
내가 가진 오류입니다 :
는org.quartz.JobPersistenceException: Database error recovering from misfires. [See nested exception: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException]
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3213)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.manage(JobStoreSupport.java:3951)
at org.quartz.impl.jdbcjobstore.JobStoreSupport$MisfireHandler.run(JobStoreSupport.java:3972)
Caused by: java.sql.SQLException: An SQLException was provoked by the following failure: java.lang.InterruptedException
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:106)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:65)
at com.mchange.v2.sql.SqlUtils.toSQLException(SqlUtils.java:62)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.acquireStatement(GooGooStatementCache.java:562)
at com.mchange.v2.c3p0.stmt.GooGooStatementCache.checkoutStatement(GooGooStatementCache.java:168)
at com.mchange.v2.c3p0.impl.NewPooledConnection.checkoutStatement(NewPooledConnection.java:234)
at com.mchange.v2.c3p0.impl.NewProxyConnection.prepareStatement(NewProxyConnection.java:199)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.quartz.impl.jdbcjobstore.AttributeRestoringConnectionInvocationHandler.invoke(AttributeRestoringConnectionInvocationHandler.java:73)
at com.sun.proxy.$Proxy3.prepareStatement(Unknown Source)
at org.quartz.impl.jdbcjobstore.StdJDBCDelegate.countMisfiredTriggersInState(StdJDBCDelegate.java:390)
at org.quartz.impl.jdbcjobstore.JobStoreSupport.doRecoverMisfires(JobStoreSupport.java:3192)
... 2 more
누군가가 나를 도울 수 는 이제와 스케줄러를 시작할 때 이 오류가 있습니까? 나는 또한 stackoverflow post을 보았다. 운이 없다. 나는 Quartz 2.2.3을 사용하고있다. 데이터베이스 테이블이 비어 있더라도 오류가 발생합니다.