代码如下:
DateTime dateTime = DateTime.parse(GlobalVariables.END_TIME_STRING, DateTimeFormat.forPattern("yyyy-MM-dd HH:mm:ss")).minusMinutes(30).plusSeconds(5); String jobCronExp = TimeUtil.formaterCronExpression(dateTime); System.out.println("job cron expression: " + jobCronExp); Cron4jPlugin cron4jPlugin = new Cron4jPlugin(); cron4jPlugin.add(jobCronExp, new ForceRefreshRankTask()); me.add(cron4jPlugin);
ForceRefreshRankTask.java
public class ForceRefreshRankTask implements Runnable { private Logger logger = LoggerFactory.getLogger(ForceRefreshRankTask.class); @Override public void run() { logger.info("强制执行前台排行榜刷新任务!"); QuestionUtil.pushRank(); } }
然后错误:
Connected to server [2017-08-18 05:31:03,336] Artifact final2017:war exploded: Artifact is being deployed, please wait... 18-Aug-2017 17:31:04.760 信息 [RMI TCP Connection(3)-127.0.0.1] org.apache.jasper.servlet.TldScanner.scanJars At least one JAR was scanned for TLDs yet contained no TLDs. Enable debug logging for this logger for a complete list of JARs that were scanned but no TLDs were found in them. Skipping unneeded JARs during scanning can improve startup time and JSP compilation time. job cron expression: 05 20 17 18 08 ? 2017 // 这是输出的cron表达式 2017-08-18 17:31:05 [INFO]-[Thread: RMI TCP Connection(3)-127.0.0.1]-[com.alibaba.druid.pool.DruidDataSource.init()]: {dataSource-1} inited 18-Aug-2017 17:31:05.581 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file 18-Aug-2017 17:31:05.581 严重 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors [2017-08-18 05:31:05,596] Artifact final2017:war exploded: Error during artifact deployment. See server log for details. 18-Aug-2017 17:31:05.596 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.alibaba.druid.proxy.DruidDriver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 18-Aug-2017 17:31:05.596 警告 [RMI TCP Connection(3)-127.0.0.1] org.apache.catalina.loader.WebappClassLoaderBase.clearReferencesJdbc The web application [ROOT] registered the JDBC driver [com.mysql.jdbc.Driver] but failed to unregister it when the web application was stopped. To prevent a memory leak, the JDBC Driver has been forcibly unregistered. 18-Aug-2017 17:31:06.524 信息 [__DEFAULT__] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [java.net.URLConnection]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [java.net.URLConnection]. The following stack trace is thrown for debugging purposes as well as to attempt to terminate the thread which caused the illegal access. at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading(WebappClassLoaderBase.java:1305) at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1293) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158) at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119) at net.sf.ehcache.util.UpdateChecker.getUpdateProperties(UpdateChecker.java:152) at net.sf.ehcache.util.UpdateChecker.doCheck(UpdateChecker.java:117) at net.sf.ehcache.util.UpdateChecker.checkForUpdate(UpdateChecker.java:104) at net.sf.ehcache.util.UpdateChecker.run(UpdateChecker.java:95) at java.util.TimerThread.mainLoop(Timer.java:555) at java.util.TimerThread.run(Timer.java:505)
这个错我都不知道怎么百度,怎么下手了,请问该怎么解决呢?
项目:JFinal