2
回答
JFinal整合snaker时插件启动报错。
开发十年,就只剩下这套Java开发体系了   

@Dead_knight  你好,刚接触这个snaker,在整合JFinal的时候,启动TomCat报错,依赖包和core包都引入了,具体报错信息见如下:

SEVERE: Exception starting filter jfinal
java.lang.RuntimeException: Plugin start error: main.java.org.snaker.jfinal.plugin.SnakerPlugin.
[Assertion failed] - this argument is required; it must not be null
 at com.jfinal.core.Config.startPlugins(Config.java:96)
 at com.jfinal.core.Config.configJFinal(Config.java:48)
 at com.jfinal.core.JFinal.init(JFinal.java:65)
 at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49)
 at org.apache.catalina.core.ApplicationFilterConfig.initFilter(ApplicationFilterConfig.java:279)
 at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:260)
 at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:105)
 at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4809)
 at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5485)
 at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1559)
 at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1549)
 at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
 at java.util.concurrent.FutureTask.run(FutureTask.java:166)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.IllegalArgumentException: [Assertion failed] - this argument is required; it must not be null
 at org.snaker.engine.helper.AssertHelper.notNull(AssertHelper.java:68)
 at org.snaker.engine.helper.AssertHelper.notNull(AssertHelper.java:77)
 at org.snaker.engine.core.SnakerEngineImpl.configure(SnakerEngineImpl.java:96)
 at org.snaker.engine.cfg.Configuration.buildSnakerEngine(Configuration.java:109)
 at main.java.org.snaker.jfinal.plugin.SnakerPlugin.start(SnakerPlugin.java:80)
 at com.jfinal.core.Config.startPlugins(Config.java:87)
 ... 16 more

我加入snaker源码进行调试时,报错处为:engine = config.buildSnakerEngine();

请问这个是什么原因。非常感谢

举报
ymg123
发帖于3年前 2回/650阅
顶部