tomcat中部署的时候,发生错误。

依赖中已经添加servlet,已经去掉了undertow和jetty。

10-Nov-2020 20:38:06.626 信息 [localhost-startStop-1] org.apache.catalina.core.ApplicationContext.log No Spring WebApplicationInitializer types detected on classpath

10-Nov-2020 20:38:07.955 严重 [localhost-startStop-1] org.apache.catalina.core.StandardContext.filterStart Exception starting filter [jfinal]

 java.lang.NoClassDefFoundError: org/apache/calcite/schema/Table

at java.lang.ClassLoader.defineClass1(Native Method)

at java.lang.ClassLoader.defineClass(ClassLoader.java:756)

at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)

at org.apache.catalina.loader.WebappClassLoaderBase.findClassInternal(WebappClassLoaderBase.java:2337)

at org.apache.catalina.loader.WebappClassLoaderBase.findClass(WebappClassLoaderBase.java:829)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1278)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137)

at java.lang.Class.forName0(Native Method)

at java.lang.Class.forName(Class.java:264)

at com.xakangboer.common.routes.Reflect.forName(Reflect.java:701)

at com.xakangboer.common.routes.Reflect.on(Reflect.java:66)

at com.xakangboer.common.routes.ClassSearcher.extraction(ClassSearcher.java:48)

at com.xakangboer.common.routes.ClassSearcher.search(ClassSearcher.java:253)

at com.xakangboer.common.model._MappingKit.annotationTable(_MappingKit.java:46)

at com.xakangboer.common.model._MappingKit.mapping(_MappingKit.java:35)

at com.xakangboer.common.config.MainConfig.configPlugin(MainConfig.java:159)

at com.jfinal.core.Config.configPluginWithOrder(Config.java:70)

at com.jfinal.core.Config.configJFinal(Config.java:59)

at com.jfinal.core.JFinal.init(JFinal.java:61)

at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:64)

at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:285)

at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:266)

at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:108)

at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4637)

at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5282)

at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1420)

at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1410)

at java.util.concurrent.FutureTask.run(FutureTask.java:266)

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: org.apache.calcite.schema.Table

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1309)

at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1137)

... 32 more


评论区

JFinal

2020-11-10 21:52

看异常是缺少依赖:
java.lang.NoClassDefFoundError: org/apache/calcite/schema/Table

这个异常一般是缺包,或者是其版本不对,应该是与 jfinal 无关的

琴海森林

2020-11-11 09:49

JFinal-layui最新版已将升级了,就不存在这些问题了,建议升级最新版的注解路由和Table注解