在我的应用程序中,我使用石英调度器2.1。x版本当我停止tomcat服务器我有这个错误:
19 mai 2014 15:52:48 org.apache.coyote.http11.Http11Protocol destroy
INFO: Arrêt de Coyote HTTP/1.1 sur http-8080
Exception in thread "Quartz Shutdown-Hook CronTriggers" java.lang.NullPointerException
Exception in thread "Quartz Shutdown-Hook CronTriggers" at org.apache.log4j.helpers.PatternConverter.spacePad(PatternConverter.java:107)
at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:80)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:506)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at org.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.log(Category.java:856)
at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:305)
at org.quartz.plugins.management.ShutdownHookPlugin$1.run(ShutdownHookPlugin.java:125)
java.lang.NullPointerException
at org.apache.log4j.helpers.PatternConverter.spacePad(PatternConverter.java:107)
at org.apache.log4j.helpers.PatternConverter.format(PatternConverter.java:80)
at org.apache.log4j.PatternLayout.format(PatternLayout.java:506)
at org.apache.log4j.WriterAppender.subAppend(WriterAppender.java:310)
at org.apache.log4j.WriterAppender.append(WriterAppender.java:162)
at org.apache.log4j.AppenderSkeleton.doAppend(AppenderSkeleton.java:251)
at rg.apache.log4j.helpers.AppenderAttachableImpl.appendLoopOnAppenders(AppenderAttachableImpl.java:66)
at org.apache.log4j.Category.callAppenders(Category.java:206)
at org.apache.log4j.Category.forcedLog(Category.java:391)
at org.apache.log4j.Category.log(Category.java:856)
at org.slf4j.impl.Log4jLoggerAdapter.info(Log4jLoggerAdapter.java:305)
at org.quartz.plugins.management.ShutdownHookPlugin$1.run(ShutdownHookPlugin.java:125)
欢迎任何帮助。由于
不要使用关闭钩来停止石英。在web应用程序中使用ServletContextListener。这也将阻止(一个原因)在web应用程序重新加载时内存泄漏