jQuery MiniUI

 找回密码
 立即注册
查看: 4726|回复: 3
打印 上一主题 下一主题

jsp class.getmethod报错 [复制链接]

Rank: 4

跳转到指定楼层
楼主
发表于 2013-3-6 15:45:01 |只看该作者 |倒序浏览
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)

Rank: 8Rank: 8

沙发
发表于 2013-3-6 15:51:04 |只看该作者
你更新下JAVA版的,这个我们前天刚更新了一个后台的问题

Rank: 8Rank: 8

板凳
发表于 2013-3-7 09:52:02 |只看该作者
你的URL的method上需要后台方法名字

Rank: 4

地板
发表于 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的格式为什么不对?

Archiver|普加软件

GMT+8, 2024-11-25 23:32 , Processed in 1.057722 second(s), 9 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部