按照《文档中心 | Guns快速开发平台》War包部署,后启动报错: java.lang.NoClassDefFoundError: cn/hutool/cron/......

0 li099418 4个月前 103次点击

Tomacat War启动后运行时hutool的Class找不到Error,如下。谢谢大神指点迷津

30-Dec-2020 12:00:00.000 信息 [hutool-cron-0] org.apache.catalina.loader.WebappClassLoaderBase.checkStateForResourceLoading Illegal access: this web application instance has been stopped already. Could not load [cn.hutool.cron.pattern.matcher.DayOfMonthValueMatcher]. 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 [cn.hutool.cron.pattern.matcher.DayOfMonthValueMatcher]. 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:1311)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1299)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
at cn.hutool.cron.pattern.CronPattern.isMatchDayOfMonth(CronPattern.java:199)
at cn.hutool.cron.pattern.CronPattern.match(CronPattern.java:171)
at cn.hutool.cron.pattern.CronPattern.match(CronPattern.java:147)
at cn.hutool.cron.TaskTable.executeTaskIfMatchInternal(TaskTable.java:269)
at cn.hutool.cron.TaskLauncher.run(TaskLauncher.java:24)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

Exception in thread "hutool-cron-0" java.lang.NoClassDefFoundError: cn/hutool/cron/pattern/matcher/DayOfMonthValueMatcher
at cn.hutool.cron.pattern.CronPattern.isMatchDayOfMonth(CronPattern.java:199)
at cn.hutool.cron.pattern.CronPattern.match(CronPattern.java:171)
at cn.hutool.cron.pattern.CronPattern.match(CronPattern.java:147)
at cn.hutool.cron.TaskTable.executeTaskIfMatchInternal(TaskTable.java:269)
at cn.hutool.cron.TaskLauncher.run(TaskLauncher.java:24)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: Illegal access: this web application instance has been stopped already. Could not load [cn.hutool.cron.pattern.matcher.DayOfMonthValueMatcher]. 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.checkStateForClassLoading(WebappClassLoaderBase.java:1301)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1158)
at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1119)
... 8 more
Caused by: java.lang.IllegalStateException: Illegal access: this web application instance has been stopped already. Could not load [cn.hutool.cron.pattern.matcher.DayOfMonthValueMatcher]. 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:1311)
at org.apache.catalina.loader.WebappClassLoaderBase.checkStateForClassLoading(WebappClassLoaderBase.java:1299)
... 10 more
Exception in thread "hutool-cron-1" java.lang.NoClassDefFoundError: cn/hutool/cron/pattern/matcher/DayOfMonthValueMatcher
at cn.hutool.cron.pattern.CronPattern.isMatchDayOfMonth(CronPattern.java:199)
at cn.hutool.cron.pattern.CronPattern.match(CronPattern.java:171)
at cn.hutool.cron.pattern.CronPattern.match(CronPattern.java:147)
at cn.hutool.cron.TaskTable.executeTaskIfMatchInternal(TaskTable.java:269)
at cn.hutool.cron.TaskLauncher.run(TaskLauncher.java:24)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

共 3 条评论
li099418 [楼主] 4个月前
0 

本地IDEA和打包成jar命令运行 都是可以启动的成功的。 就是打包成War不行,guns-core中POM也排除了相应的包和添加了javax.servlet-api包。 但是Toamcat就是无法启动。

li099418 [楼主] 4个月前
0 

image

729942025 1个月前
0 

兄嘚,报错解决了吗?

作者

积分:20

这家伙很懒,什么都没有留下
作者其它话题