Jfinal_Demo中运行时出现的错误

圣杰是也 发布于 2015/02/08 22:46
阅读 1K+
收藏 0

@王仁辉(java) 你好,想跟你请教个问题:

我下载项目,运行后发现出了这样的错误,是不是路由绑定的插件没写好,还是我配置的原因?



2212 [main] ERROR com.jfinal.core.Config - Plugin start error: cn.dreampie.shiro.core.ShiroPlugin. 
The Table mapping of model: cn.dreampie.function.user.model.Role not exists. Please add mapping to ActiveRecordPlugin: activeRecordPlugin.addMapping(tableName, YourModel.class).
java.lang.RuntimeException: The Table mapping of model: cn.dreampie.function.user.model.Role not exists. Please add mapping to ActiveRecordPlugin: activeRecordPlugin.addMapping(tableName, YourModel.class).
	at com.jfinal.plugin.activerecord.TableMapping.getTable(TableMapping.java:45) ~[jfinal-1.9.jar:na]
	at cn.dreampie.web.model.Model.getTable(Model.java:113) ~[jfinal-web-0.2.jar:na]
	at cn.dreampie.web.model.Model.getTableName(Model.java:127) ~[jfinal-web-0.2.jar:na]
	at cn.dreampie.web.model.Model.getFromSql(Model.java:151) ~[jfinal-web-0.2.jar:na]
	at cn.dreampie.web.model.Model.findAll(Model.java:41) ~[jfinal-web-0.2.jar:na]
	at cn.dreampie.common.shiro.MyJdbcAuthzService.getJdbcAuthz(MyJdbcAuthzService.java:30) ~[classes/:na]
	at cn.dreampie.shiro.core.ShiroKit.loadJdbcAuthz(ShiroKit.java:154) ~[jfinal-shiro-0.2.jar:na]
	at cn.dreampie.shiro.core.ShiroKit.loadJdbcAuthz(ShiroKit.java:141) ~[jfinal-shiro-0.2.jar:na]
	at cn.dreampie.shiro.core.ShiroKit.init(ShiroKit.java:71) ~[jfinal-shiro-0.2.jar:na]
	at cn.dreampie.shiro.core.ShiroPlugin.start(ShiroPlugin.java:136) ~[jfinal-shiro-0.2.jar:na]
	at com.jfinal.core.Config.startPlugins(Config.java:87) [jfinal-1.9.jar:na]
	at com.jfinal.core.Config.configJFinal(Config.java:48) [jfinal-1.9.jar:na]
	at com.jfinal.core.JFinal.init(JFinal.java:67) [jfinal-1.9.jar:na]
	at com.jfinal.core.JFinalFilter.init(JFinalFilter.java:49) [jfinal-1.9.jar:na]
	at org.eclipse.jetty.servlet.FilterHolder.doStart(FilterHolder.java:119) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:724) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:265) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.server.handler.ContextHandler.doStart(ContextHandler.java:706) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.webapp.WebAppContext.doStart(WebAppContext.java:492) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.server.handler.HandlerWrapper.doStart(HandlerWrapper.java:95) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.server.Server.doStart(Server.java:277) [jetty-server-8.1.8.jar:na]
	at org.eclipse.jetty.util.component.AbstractLifeCycle.start(AbstractLifeCycle.java:64) [jetty-server-8.1.8.jar:na]
	at com.jfinal.server.JettyServer.doStart(JettyServer.java:120) [jfinal-1.9.jar:na]
	at com.jfinal.server.JettyServer.start(JettyServer.java:64) [jfinal-1.9.jar:na]
	at com.jfinal.core.JFinal.start(JFinal.java:159) [jfinal-1.9.jar:na]
	at cn.dreampie.common.config.AppConfig.main(AppConfig.java:176) [classes/:na]
2213 [main] WARN  org.eclipse.jetty.util.component.AbstractLifeCycle - FAILED jfinal: java.lang.RuntimeException: Plugin start error: cn.dreampie.shiro.core.ShiroPlugin.





加载中
0
Dreampie
Dreampie
Role是不是没有加table的注解,你参照jfinal-demo
圣杰是也
圣杰是也
昨晚就看了,确实加了table注解,然后数据库中的表也生成了, 你的mysql的版本可能很高,所以其中的current_time表插入时有错误。我们低版本的mysql需要修改一下。 等晚上回去再看看。
0
Dreampie
Dreampie
或者没有生成表
0
Dreampie
Dreampie
嗯,我用的5.6,updated_at
Dreampie
Dreampie
有些特性可能不支持,timestampe有变化
返回顶部
顶部