使用grails 2.3.7生产石英作业错误

时间:2014-03-16 09:26:20

标签: grails quartz-scheduler

使用石英调度程序插件(v1.0.1)处理grails并使用相同的代码执行石英作业:

import java.util.logging.Logger

import org.quartz.DisallowConcurrentExecution
import org.quartz.Job
import org.quartz.JobExecutionContext
import org.quartz.JobExecutionException
import org.quartz.PersistJobDataAfterExecution


@PersistJobDataAfterExecution
@DisallowConcurrentExecution
class AccountingWatchJob implements Job {

    def sessionRequired = false
    def concurrent = false
    def volatility = false
    def group = "AccountingProcess"
    def accountingWatchService

    static triggers = {
        // daily at 5:00 am
        cron name:'triggerPayment', startDelay:300000, cronExpression: '0 0 5 * * ?'

    }

    @Override
    public void execute(JobExecutionContext context) throws JobExecutionException {

        try {
            accountingWatchService.start()
        } catch (Throwable e) {
            log.error(e)
        }


    }
}

仅在生产模式中出现错误=>

[quartzScheduler_Worker-1] ERROR grails.app.jobs.com.ubiness.ubistore.AccountingWatchJob  - java.lang.reflect.UndeclaredThrowableException

0 个答案:

没有答案