`

No result defined for action

阅读更多
问题场景:
项目设计模式:SpringMVC
调试程序过程中出现如下异常

异常信息:
com.opensymphony.xwork2.config.ConfigurationException: No result defined for action com.XXX.web.action.ProjectAction and result
    at com.opensymphony.xwork2.DefaultActionInvocation.executeResult(DefaultActionInvocation.java:374) [xwork-core-2.3.32.jar:2.3.32]
    at com.opensymphony.xwork2.DefaultActionInvocation.invoke(DefaultActionInvocation.java:276) [xwork-core-2.3.32.jar:2.3.32]

问题分析:
调试代码过程中,ACTION执行突然失效,无法跳转下一个页面,控制台报上面的异常,无法对应指定的出错原因

问题解决:
Debug 模式跟踪,发现在执行调用一个接口时发生异常,无返回值。导致空指针异常,而在ACTION的代码中仅仅有一个打的 try catch 代码块,在 catch 中未做相应的跳转处理,所以程序报错,找不到跳转的位置

问题总结:
不要一个方法里面一个try catch ,用一个 Exception 代表所有。逐个方法,逐个抛出相应异常并打印
try catch finally 处理,如何 if esle 配对出现,处理 if ,有时无需处理 else ,但为了避免出现错误,有if 一定要有 else ,可以仅仅输出一行日志;同理,在 try 中做了跳转处理,在 catch 中同样要考虑如果发生异常了,该如何处理,跳转哪个页面。
分享到:
评论

相关推荐

    jsp\No result defined for action and result input.doc

    jsp\No result defined for action and result input.doc

    No result defined for action.doc

    No result defined for action.doc

    struts_2.3.12GA_API文档(chm版本)

    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 ...

    a project model for the FreeBSD Project.7z

    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 ...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    For this reason, the functions that handle these actions offer the option of waiting until the action is complete before returning (so-called synchronous operation); although they can be called in an ...

    BURNINTEST--硬件检测工具

    - 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 ...

    Implementing 802.1X Security Solutions for Wired and Wireless Networks.pdf

    7.16. Protected Result Indications 271 8. Acknowledgements 273 9. References 273 9.1. Normative References 273 9.2. Informative References 274 Appendix A. Changes from RFC 2284 276 Authors’ Addresses...

    php.ini-development

    should be disabled, as enabling it may result in issues when generating XML ; documents, however this remains supported for backward compatibility reasons. ; Note that this directive does not control...

    polycom宝利通视频会议软件3.9 2018

    (if you are located in the rest of the world) (each referred to individually and collectively herein as “POLYCOM”), for the SOFTWARE PRODUCT (as defined below) licensed by POLYCOM or its suppliers....

    Java邮件开发Fundamentals of the JavaMail API

    Presented by developerWorks, your source for great tutorials ibm.com/developerWorks Table of Contents If you're viewing this document online, you can click any of the topics below to link ...

    k7 SRIO参考例程

    - CR#477217 / AR#31318 - No longer applicable, v5.1 introduces new buffer. - Core accepts muddled packet when reinitializing during packet receipt - Version fixed : v4.4rev1 - CR#477115 / AR#...

    FlexGraphics_V_1.79_D4-XE10.2_Downloadly.ir

    - FIX: The result rectangle incorrectly calculated in the TFlexText.GetRefreshRect method. - FIX: Added FPaintCache.rcPaint cleanup in the TFlexPanel.WMPaint method. Now it is possible to define is ...

    微软内部资料-SQL性能优化3

    SQL Server never asks for SIX locks directly, they are always the result of a conversion. For example, suppose a transaction scanned a page using an S lock and then subsequently decided to perform a ...

    2009 达内Unix学习笔记

    集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...

    曲线拟合工具CurveExpert 1.0

    + Cascading a large number of windows would sometimes result in some windows being moved off of the screen. Now, the cascade restarts at the top left if a window might be moved off-screen. + The ...

    Bloodshed Dev-C++

    * Caching of result set of code-completion for speed-up. * New option "Execution/Parameters" (and "Debug/Parameters"). Version 4.9.5.0 (5.0 beta 5): * CPU Window (still in development) * ToDo list * ...

    ZendFramework中文文档

    创建默认的控制器(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....

    雷达技术知识

    date, however, no one has tested if LiDAR returns from water surfaces can be used to measure local water surface slopes within the active channel. Much of the reason that researchers have not ...

    DebuggingWithGDB 6.8-2008

    4.1 Compiling for Debugging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.2 Starting your Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ...

    UG6.0快捷键大全

    MESSAGE Deforms a surface region using a law defined by a function. SYNONYMS overcrown, global deformation, surface feature HELP DSN_global_shaping_by_function BITMAP globalshaping ACTIONS ...

Global site tag (gtag.js) - Google Analytics