2017-12-21 16:58

@JFinal 嗷嗷,了解,多谢老师

2017-12-21 15:05

@JFinal 单步调试的时候在actionHandler中这个函数出现异常:
catch (Exception e) {
if (log.isErrorEnabled()) {
String qs = request.getQueryString();
(异常)log.error(qs == null ? target : target + "?" + qs, e);
}

2017-12-21 15:01

@JFinal Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.jfinal.aop.Invocation.invoke(Invocation.java:73)
... 25 more
Caused by: java.lang.NoClassDefFoundError: com/alibaba/fastjson/JSON
at com.jfinal.json.FastJson.parse(FastJson.java:42)
at com.common.AddController.index(AddController.java:17)
... 30 more
Caused by: java.lang.ClassNotFoundException: com.alibaba.fastjson.JSON
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:335)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at org.eclipse.jetty.webapp.WebAppClassLoader.loadClass(WebAppClassLoader.java:430)
at com.jfinal.server.JFinalClassLoader.loadClass(JFinalClassLoader.java:53)
... 32 more

2017-12-21 11:31

@JFinal 用到了FastJson.getJson().parse(),出现了这样的错误:
com.jfinal.core.ActionHandler error
严重: /add
java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
at com.jfinal.aop.Invocation.invoke(Invocation.java:87)
at com.jfinal.core.ActionHandler.handle(ActionHandler.java:74)
at com.jfinal.core.JFinalFilter.doFilter(JFinalFilter.java:73)
at org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1307)

2017-12-20 16:22

@YiQang 我执行getModel后,应该是没有映射到

2017-12-20 16:19

@JFinal 请问getModle()的返回值,是将表单中的字段,映射到user.class这个类对象中吗?也就是说代替了以前request.getparameter()这类的函数吗?

2017-12-20 15:14

@JFinal 我把id主键改成了自增主键,但是在我执行之前的操作后,保存到数据库的数据不对,只是id增长了一个,其余全部是null,是我数据库的问题?还是getModel我写的不对呢?