gpt4 book ai didi

java.lang.ClassNotFoundException : org. quartz .DisallowConcurrentExecution

转载 作者:塔克拉玛干 更新时间:2023-11-02 08:57:04 24 4
gpt4 key购买 nike

我已经开发了一些执行 quartz 作业的代码。起初代码在 tomcat 之外并且执行得很好,但是当我尝试将相同的代码嵌入到 Web 应用程序中时,我得到了 java.lang.NoClassDefFoundError: org/quartz/DisallowConcurrentExecution.我正在使用 quartz 2.1.5,它已经在类路径中了。这是堆栈跟踪:

Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.NoClassDefFoundError: org/quartz/DisallowConcurrentExecution
INFO: Illegal access: this web application instance has been stopped already. Could not load org.quartz.DisallowConcurrentExecution. The eventual following stack trace is caused by an error thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access, and has no functional impact.
at org.quartz.impl.JobDetailImpl.isConcurrentExectionDisallowed(JobDetailImpl.java:390)
java.lang.IllegalStateException
at org.quartz.simpl.RAMJobStore.acquireNextTriggers(RAMJobStore.java:1447)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1273)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
Caused by: java.lang.ClassNotFoundException: org.quartz.DisallowConcurrentExecution
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1387)
at org.quartz.impl.JobDetailImpl.isConcurrentExectionDisallowed(JobDetailImpl.java:390)
at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1233)
at org.quartz.simpl.RAMJobStore.acquireNextTriggers(RAMJobStore.java:1447)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:264)

最佳答案

确保您的类路径中只有 1 个 quartz-all-.jar(也许您在 Tomcat lib 文件夹中有 2 : 1 + 在您的 war 中有 1 个)

关于java.lang.ClassNotFoundException : org. quartz .DisallowConcurrentExecution,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11086736/

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