gpt4 book ai didi

tomcat - 在独立tomcat实例中运行时Grails Quartz Plugin错误

转载 作者:行者123 更新时间:2023-11-28 21:56:24 27 4
gpt4 key购买 nike

我正在开发一个利用 quartz 插件的 grails 项目。该插件按预期工作,在开发模式下本地运行项目没有问题。但是,在独立的 tomcat 实例中运行项目时出现以下错误。

Error initializing Grails: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginManager' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.RuntimeException: Unable to locate constructor with Class parameter for class grails.plugins.quartz.DefaultGrailsJobClass
... 1 more
Caused by: java.lang.reflect.InvocationTargetException
... 1 more
Caused by: java.lang.IncompatibleClassChangeError: Implementing class
at java.lang.ClassLoader.defineClass(ClassLoader.java:621)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at grails.plugins.quartz.config.TriggersConfigBuilder.createTrigger(TriggersConfigBuilder.groovy:77)
at grails.plugins.quartz.config.TriggersConfigBuilder.createNode(TriggersConfigBuilder.groovy:251)
at grails.plugins.quartz.config.TriggersConfigBuilder.createNode(TriggersConfigBuilder.groovy:244)
at org.motus.CompetitionJob$__clinit__closure10.doCall(CompetitionJob.groovy:18)
at grails.plugins.quartz.config.TriggersConfigBuilder.build(TriggersConfigBuilder.groovy:51)
at grails.plugins.quartz.DefaultGrailsJobClass.evaluateTriggers(DefaultGrailsJobClass.java:57)
at grails.plugins.quartz.DefaultGrailsJobClass.<init>(DefaultGrailsJobClass.java:47)
... 1 more

这是我在 BuildConfig.groovy 中的内容

编译“:quartz:1.0.1”

任何关于如何补救的想法或方向将不胜感激。预先感谢您的帮助。

最佳答案

我也在使用 Apache Shiro 插件,结果发现它有一个需要排除的 quartz 依赖项。感谢 Lalit 的链接

compile ":quartz:1.0.1"
compile (":shiro:1.2.1"){
excludes "quartz"
}

关于tomcat - 在独立tomcat实例中运行时Grails Quartz Plugin错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26053868/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com