Unexpected Exception caught setting

......


三月 15, 2016 1:31:04 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error

严重: Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'confirmNewPwd' on 'class com.wlgj.xtjc.biz.user.action.UserAction: Error setting expression 'confirmNewPwd' with value ['123456789', ]
三月 15, 2016 1:31:04 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
严重: Developer Notification (set struts.devMode to false to disable this message):
Unexpected Exception caught setting 'currentPwd' on 'class com.wlgj.xtjc.biz.user.action.UserAction: Error setting expression 'currentPwd' with value ['123', ]
三月 15, 2016 1:31:04 下午 com.opensymphony.xwork2.util.logging.commons.CommonsLogger error
严重: Developer Notification (set struts.devMode to false to disable this message):

Unexpected Exception caught setting 'newPwd' on 'class com.wlgj.xtjc.biz.user.action.UserAction: Error setting expression 'newPwd' with value ['123456', ]

................

 “当struts.devMode设置为true时,html表单数据中有和action属性匹配不上的参数名时(使用域对象时的非对象属性,或DrivenModel时,此model没有的属性时)就会报此提示。出现这个没什么影响,就是为了便于使用者调试。struts.devMode设置为false就没有了。可能它的log级别设置的容易让人误会。” Action中没有定义setter和getter方法时,使用request.getParameter("name")也可以取到;


   解决方法 1:struts.devMode设置为false  

          解决方法 2: 在Action中增加对应的setter方法

         解决方法 3:使用域对象或驱动模型时,给domain对应的增加对应的属性或者临时属性即可。


  • 4
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
回答: 当异步方法调用发生意外异常时,会出现"Unexpected exception occurred invoking async method"的错误信息。这个错误信息是由AsyncUncaughtExceptionHandler处理的。AsyncUncaughtExceptionHandler是一个接口,它定义了处理异步方法未捕获异常的方法handleUncaughtException。在源码中,我们可以看到SimpleAsyncUncaughtExceptionHandler类实现了AsyncUncaughtExceptionHandler接口,并在handleUncaughtException方法中打印了错误信息。\[1\]\[2\]如果我们想自定义处理器,可以添加一个自定义的AsyncConfigurer,并在其中重写getAsyncUncaughtExceptionHandler方法,实现自己的异常处理逻辑。\[3\] #### 引用[.reference_title] - *1* [未来:spring响应式编程 Hands-On Reactive Programming in Spring 5(三),spring事件监听](https://blog.csdn.net/weixin_45699541/article/details/126517135)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* *3* [《Spring 高手系列》(异步)笔记](https://blog.csdn.net/qq_37151886/article/details/127749503)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^insertT0,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值