jQuery MiniUI

标题: jsp class.getmethod报错 [打印本页]

作者: sunny_zhang    时间: 2013-3-6 15:45:01     标题: jsp class.getmethod报错

org.apache.jasper.JasperException: An exception occurred processing JSP page /data/FormService.jsp at line 19

16:     argsClass[1] = HttpServletResponse.class;
17:     
18:     Class cls = this.getClass();   
19:     Method method = cls.getMethod(methodName, argsClass);   
20:     
21:     Object[] args = new Object[2];
22:     args[0] = request;

Stacktrace:
        org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:568)
        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:470)
        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)
        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)
        javax.servlet.http.HttpServlet.service(HttpServlet.java:728)


root cause java.lang.NullPointerException        java.lang.Class.searchMethods(Class.java:2661)        java.lang.Class.getMethod0(Class.java:2685)        java.lang.Class.getMethod(Class.java:1620)        org.apache.jsp.data.FormService_jsp._jspService(FormService_jsp.java:99)        org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)        javax.servlet.http.HttpServlet.service(HttpServlet.java:728)        org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:432)        org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:390)        org.apache.jasper.servlet.JspServlet.service(JspServlet.java:334)        javax.servlet.http.HttpServlet.service(HttpServlet.java:728)

作者: factory    时间: 2013-3-6 15:51:04

你更新下JAVA版的,这个我们前天刚更新了一个后台的问题
作者: factory    时间: 2013-3-7 09:52:02

你的URL的method上需要后台方法名字
作者: sunny_zhang    时间: 2013-3-7 11:01:50

factory 发表于 2013-3-7 09:52
你的URL的method上需要后台方法名字

谢谢,此问题已解决。还有一个问题
{"username":"daf@tom.com","pwd":"123456"}
Exception in thread "main" flexjson.JSONException: Failed to parse pwd with yyyy-MM-dd'T'HH:mm:ss pattern.
at flexjson.transformer.DateTransformer.instantiate(DateTransformer.java:33)
at flexjson.ObjectBinder.bind(ObjectBinder.java:90)
at flexjson.ObjectBinder.bindIntoMap(ObjectBinder.java:118)
at flexjson.factories.MapObjectFactory.instantiate(MapObjectFactory.java:19)
at flexjson.ObjectBinder.bind(ObjectBinder.java:90)
at flexjson.ObjectBinder.bind(ObjectBinder.java:69)
at flexjson.JSONDeserializer.deserialize(JSONDeserializer.java:150)
at share.JSON.Decode(JSON.java:28)
at share.JSON.main(JSON.java:39)
Caused by: java.text.ParseException: Unparseable date: "pwd"
at java.text.DateFormat.parse(DateFormat.java:357)
at flexjson.transformer.DateTransformer.instantiate(DateTransformer.java:31)
... 8 more

请问pwd的格式为什么不对?






欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2