Linux出问题,win没问题。jfinal2.2
异常内容:
2016-08-24 17:11:20 [ERROR]-[Thread: http-18080-2]-[com.jfinal.core.ActionHandler.handle()]: /webservice/receive java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at com.jfinal.aop.Invocation.invoke(Invocation.java:87) at com.rayootech.webservice.interceptor.CommonInterceptor.intercept(CommonInterceptor.java:20) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.rayootech.webservice.interceptor.UserInterceptor.intercept(UserInterceptor.java:27) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.jfinal.ext.interceptor.SessionInViewInterceptor.intercept(SessionInViewInterceptor.java:44) at com.jfinal.aop.Invocation.invoke(Invocation.java:67) at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74) at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:72) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:620) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException 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.aop.Invocation.invoke(Invocation.java:73) ... 20 more Caused by: java.lang.NoClassDefFoundError: org/eclipse/jetty/util/log/Log at com.rayootech.webservice.service.DatasourcesService.init(DatasourcesService.java:71) at com.rayootech.webservice.handler.InitDatasourceHandler.handle(InitDatasourceHandler.java:53) at com.rayootech.webservice.service.SendOutService.receive(SendOutService.java:252) at com.rayootech.webservice.web.WebserviceController.receive(WebserviceController.java:166) ... 25 more
源码:
import com.jfinal.aop.Interceptor; import com.jfinal.aop.Invocation; import com.jfinal.kit.PropKit; public class CommonInterceptor implements Interceptor { @Override public void intercept(Invocation ai) { ai.getController().getRequest().setAttribute("ctx", ai.getController().getRequest().getContextPath()); ai.getController().getRequest().setAttribute("webtitle", PropKit.get("title")); ai.invoke(); } }
异常:
at com.rayootech.webservice.interceptor.CommonInterceptor.intercept(CommonInterceptor.java:20)
第20行是
ai.invoke();
Config配置:
/** * 配置全局拦截器 */ public void configInterceptor(Interceptors me) { me.add(new SessionInViewInterceptor()); me.add(new UserInterceptor()); me.add(new CommonInterceptor()); }
项目:JFinal
应该是项目部署在 tomcat 之下,但 jetty 的 jar 包没清干净