Tomcat抱怨.schedule()中的参数类型

时间:2020-09-09 08:12:50

标签: tomcat grails scheduler

我的BootStrap.groovy(Grails 2.5.6)说:

AutoKbartUrlUpdateJob.schedule(grailsApplication.config.ygor.autoUpdateJobsInterval, params)

和IDEA IntelliJ绝对可以,执行作业没有任何问题。但是当部署到Tomcat服务器上时,Tomcat无法启动,并说:

groovy.lang.MissingMethodException: No signature of method: static ygor.AutoKbartUrlUpdateJob.schedule() is applicable for argument types: (java.lang.String, java.util.HashMap)

我正在使用grails石英插件:

compile "org.grails.plugins:quartz:1.0.2"

QuartzGrailsPlugin.groovy使用以下方法为Job类添加接收方法(仅在IntelliJ中工作)

// Schedule with job with cron trigger
    mc.'static'.schedule = { String cronExpression, Map params = null ->
        scheduleTrigger(TriggerUtils.buildCronTrigger(jobName, jobGroup, cronExpression), params)
    }

如何解决此问题,使其在IntelliJ和Tomcat上都能正常工作?我找不到使用搜索引擎的信息。

如果两个版本都不适用,那么我会使用其他版本,因此仅Tomcat的解决方案也会对我有帮助。

1 个答案:

答案 0 :(得分:-1)

一个瞎子。我缺少提交在版本管理(git)中添加到BuildConfig.groovy的grails插件。

相关问题