为什么 Grails Quartz 插件失败?
对我已经部署的 Grails 应用程序进行一些更改后,我尝试重新编译 WAR 文件,并开始收到此错误(显然有点短):
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'pluginManager' defined in ServeletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError: Lorg/quartz/Scheduler;
...
Caused by: java.lang.NoClassDefFoundError: Lorg/quartz/Scheduler;
...
Caused by: java.lang.ClassNotFoundException: org.quartz.Scheduler
在此之前,我使用此应用程序时 Quartz 没有遇到任何问题。 grails clean
并删除缓存的每个部分(包括 .ivy2
文件夹)都没有帮助。谷歌搜索没有返回任何有用的信息。帮助?
After making a few changes to my already-deployed Grails app, I attempted to recompile the WAR file, and started receiving this error (obviously shorted a bit):
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'pluginManager' defined in ServeletContext resource
[/WEB-INF/applicationContext.xml]: Invocation of init method failed;
nested exception is java.lang.NoClassDefFoundError: Lorg/quartz/Scheduler;
...
Caused by: java.lang.NoClassDefFoundError: Lorg/quartz/Scheduler;
...
Caused by: java.lang.ClassNotFoundException: org.quartz.Scheduler
I haven't had any problems with Quartz before this with this app. grails clean
and deleting every part of my cache (including the .ivy2
folder) hasn't helped. Googling hasn't returned anything useful. Help?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
啊。我终于弄清楚了问题的原因。我的应用程序正在使用 Grails Webflow 插件,默认情况下 1.3.3 及更高版本中不包含该插件。所以,我必须从其他来源找到它。即其他 Maven 存储库。
虽然我只需要Webflow插件,但每次下载所有资源时,我都会拉入非常多的资源。我只能假设该罐子覆盖了我已有的罐子。经过一番挖掘,我找到了导致问题的存储库,并将其从 BuildConfig.groovy 文件中删除。
现在就很头疼了。
Ugh. I finally figured out the cause of the problem. My app is using the Grails Webflow plugin, which is not included by default with 1.3.3 and higher. So, I had to find it from other sources. Namely, other Maven repositories.
Even though I only needed the Webflow plugin, each time I would download all of the resources, I would pull in an extremely large amount. I can only assume that the jar were overwriting the jars I already had in place. After some digging, I was able to find the repository that was causing the problems, and deleted it from my BuildConfig.groovy file.
Now that's a headache.