最近一次系统升级,随机出现编辑原来数据库数据失败问题,而如果修改这个action所有数据则可以成功,新添加再修改也可以成功。跟踪发现系统报错:
No result defined for action com.jim.web.action.appointment.AppointmentAction and result input
com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:376)
com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:278)
com.opensymphony.xwork2.validator.ValidationInterceptor.doIntercept(ValidationInterceptor.java:265)
org.apache.struts2.interceptor.validation.AnnotationValidationInterceptor.doIntercept(AnnotationValidationInterceptor.java:68)
com.opensymphony.xwork2.interceptor.MethodFilterInterceptor.intercept(MethodFilterInterceptor.java:98)
再到代码中跟踪发现:
WARN OgnlValueStack:60 - Error setting expression 'appointment.customerId' with value '[Ljava.lang.String;@15475116'
ognl.MethodFailedException: Method "setCustomerId" failed for object com.jim.bean.appointment.Appointment@18f75278 [java.lang.NoSuchMethodException: com.jim.bean.appointment.Appointment.setCustomerId([Ljava.lang.String;)]
.............................................................................................................
Caused by: java.lang.NoSuchMethodException: com.jim.bean.appointment.Appointment.setCustomerId([Ljava.lang.String;)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1233)
... 67 more
/-- Encapsulated exception ------------\
java.lang.NoSuchMethodException: com.jim.bean.appointment.Appointment.setCustomerId([Ljava.lang.String;)
at ognl.OgnlRuntime.callAppropriateMethod(OgnlRuntime.java:1233)
............................................................................................................
\--------------------------------------/
09:25:59,222 ERROR Dispatcher:38 - Could not find action or result
/blackfoot/pages/booking/editAppointmentByJsonAction
No result defined for action com.jim.web.action.appointment.AppointmentAction and result input
发现是bean映射时变量类型错误导致请注意一下信息
“Error setting expression 'appointment.customerId' with value '[Ljava.lang.String”
在bean appointment中“customerId”是Integer类型,但jsp和js却直接映射成String,导致异常发什么。
在js中原来为
"appointment.customerId" :$("#customerId").val(),
jquery 从input获得的是一个String类型值,改正为获得值后直接强制转化为10进制 Integer类型
"appointment.customerId" :parseInt($("#customerId").val(),10),
后面“10”表示10进制,如果为“8”则为8进制,以此类推
问题解决。
分享到:
相关推荐
jsp\No result defined for action and result input.doc
Your program’s input and output . . . . . . . . . . . . . . . . . . . . . . . . Debugging an already-running process . . . . . . . . . . . . . . . . . . . Killing the child process . . . . . . . . . ...
4.6 Your Program’s Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Debugging an Already-running Process . . . . . . . . . . . . . . . . . . . . . . 4.8 Killing the Child ...
Your program’s input and output . . . . . . . . . . . . . . . . . . . . . . . . Debugging an already-running process . . . . . . . . . . . . . . . . . . . Killing the child process . . . . . . . . . ...
4.6 Your Program’s Input and Output . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Debugging an Already-running Process . . . . . . . . . . . . . . . . . . . . . . . . 4.8 Killing the ...
Software Testing and Continuous Quality Improvement <br>SECTION I SOFTWARE QUALITY IN PERSPECTIVE . . . . . . . . . . . . . . . 1 1 Quality Assurance Framework. . . . . . . . . . . . . . . . . ....
There is no defined model for how people write code in FreeBSD. However, Niels Jørgenssen has suggested a model of how written code is integrated into the project. Figure 4-1. Jørgenssen's model ...
创建默认的控制器(Action Controller) 7.1.2.6. 创建你的视图脚本 7.1.2.7. 创建你自己的错误控制器 7.1.2.8. 访问站点! 7.2. Zend_Controller 基础 7.3. 前端控制器 7.3.1. 概述 7.3.2. 主要方法 7.3....
of the INI constants (On, Off, True, False, Yes, No and None) or an expression ; (e.g. E_ALL & ~E_NOTICE), a quoted string ("bar"), or a reference to a ; previously set variable or directive (e.g. ${...
- Minor changes to the No operation error watchdog timer for the CD and Hard disk tests. - Minor correction to the Butterfly seek test. - Video playback trace logging increased. Release 5.3 build ...
Stops the action invocation immediately (by throwing a PauseException) and causes the action invocation to return the specified result, such as Action.SUCCESS, Action.INPUT, etc. void ...
The Project Manager is responsible for the project objectives to deliver the final product that has been defined, within the constraints of project scope, time, cost and required quality. Strengths...
For example, if T1 writes some object that is in T2’s input or output set, there is a dependency between T1 and T2. Bad Dependencies These include lost updates, dirty reads, non-repeatable reads, ...
The VariSpec always processes each command to completion before starting on the next command, and it has a 256 byte input buffer, so there is no problem issuing several commands at once; they will all...
framework adds support for typing arbitrary blocks of data and handling it accordingly. This doesn't sound like much, but it is your basic MIME-type support found in many browsers and mail tools ...
集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...
r Your program's input and output file:///C|/gdb.html (1 of 352)19. 1. 2004 20:32:03 Debugging with GDB Debugging an already-running process r Killing the child process r Debugging programs with ...
MESSAGE Changes the density and the density units for a solid body. SYNONYMS edit mass, thickness, solid property HELP DSN_solid_density BITMAP editsoliddensity ACTIONS STANDARD SEPARATOR ...
Action是QTP组织测试用例的具体形式,拥有自己的DataTable和Object Repository,支持Input和output参数。Action可以设置为share类型的,这样可以被其他test中的Action调用(注意:QTP是不支持在一个test中调用另外一...