开发者

Why do grails Quartz jobs die after a few minutes on production?

Using the grails Quartz plugin (latest stable version, 0.4.2), I have four different Jobs that run fine in my development environment, most of them every minute.

However in the production environment, they run for a few minutes and then "die" - they just 开发者_Go百科don't run anymore. There is no Exception thrown or similar. The rest of the application still works fine.

Does anybody have an idea what the reason for this could be? Where / How should I start analyzing the problem?


I also ran into an issue with quartz-1.5.2.jar being used instead of the quartz-1.7.3.jar included in the quartz plugin. I traced it to a dependency in shiro, which itself includes a shiro-quartz.jar that itself has a dependency on that exact version of quartz.

My solution was to add this to my BuildConfig.groovy:

grails.project.dependency.resolution = {

    ...

    dependencies {
        compile("org.apache.shiro:shiro-quartz:1.0.0-incubating") {
            excludes("quartz")
        }
    }
}

If it's not shiro, try running grails dependency-report. From there you can find out what is pulling in the wrong version of quartz.


I think I found the problem based on this grails JIRA comment.

Somehow the quartz-1.5.2.jar was on my production environment, in addition to quartz-1.7.3.jar. I've removed it and after restarting Tomcat, it's been working (at least until now).

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜