同样的代码,在本地发布没问题,在服务器发布报错,都是tomcat7

栋11 发布于 2015/11/20 12:37
阅读 1K+
收藏 0


@JFinal 你好,想跟你请教个问题:

同样的代码,在本地发布没问题,把部署包复制到服务器发布报错,都是tomcat7;

报错如下。

com.jfinal.plugin.activerecord.ActiveRecordException: java.lang.RuntimeException: The TableMapping of model: com.canyou.model.User not exists. Please add mapping to ActiveRecordPlugin(activeRecordPlugin.addMapping(tableName, YourModel.class)).
 at com.jfinal.plugin.activerecord.Model.find(Model.java:424)
 at com.jfinal.plugin.activerecord.Model.findFirst(Model.java:453)
 at com.canyou.service.LoginService.findByUserName(LoginService.java:127)
 at com.canyou.service.LoginService.login(LoginService.java:49)
 at com.canyou.controller.LoginController.login(LoginController.java:54)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 at java.lang.reflect.Method.invoke(Method.java:606)
 at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:55)
 at com.canyou.shiro.ShiroInterceptor.intercept(ShiroInterceptor.java:94)
 at com.jfinal.core.ActionInvocation.invoke(ActionInvocation.java:51)
 at com.jfinal.core.ActionHandler.handle(ActionHandler.java:73)
 at com.canyou.handler.XssHandler.handle(XssHandler.java:40)
 at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
 at org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
 at org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
 at org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
 at org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
 at org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
 at org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at com.canyou.util.NewSessionFilter.doFilter(NewSessionFilter.java:93)
 at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241)
 at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
 at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220)
 at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122)
 at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:505)
 at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:170)
 at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
 at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:956)
 at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116)
 at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:423)
 at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1079)
 at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:625)
 at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:316)
 at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
 at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
 at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
 at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.RuntimeException: The TableMapping of model: com.canyou.model.User not exists. Please add mapping to ActiveRecordPlugin(activeRecordPlugin.addMapping(tableName, YourModel.class)).
 at com.jfinal.plugin.activerecord.TableInfoMapping.getTableInfo(TableInfoMapping.java:42)
 at com.jfinal.plugin.activerecord.Model.checkTableName(Model.java:434)
 at com.jfinal.plugin.activerecord.Model.find(Model.java:397)
 at com.jfinal.plugin.activerecord.Model.find(Model.java:422)
 ... 43 more

加载中
0
JFinal
JFinal
手动看一下远程的 WEB-INF/classes 目录下面是否真的有编译好的 class 文件,另外,看一下是否掉坑里去了:http://my.oschina.net/jfinal/blog/353062 
后海
后海
有关Jfinal在jetty环境下开发,tomcat环境下发布造成的问题解决心得。 http://my.oschina.net/matol/blog/530445
1
栋11
栋11

引用来自“JFinal”的评论

手动看一下远程的 WEB-INF/classes 目录下面是否真的有编译好的 class 文件,另外,看一下是否掉坑里去了:http://my.oschina.net/jfinal/blog/353062 

解决了,多谢多谢!掉坑里了。

0
JFinal
JFinal

引用来自“JFinal”的评论

手动看一下远程的 WEB-INF/classes 目录下面是否真的有编译好的 class 文件,另外,看一下是否掉坑里去了:http://my.oschina.net/jfinal/blog/353062 

引用来自“栋11”的评论

解决了,多谢多谢!掉坑里了。

还好我提前把这些坑都在博客里提醒大家了
返回顶部
顶部