- 浏览: 209732 次
- 性别:
- 来自: 哈尔滨
文章分类
- 全部博客 (267)
- java.lang (8)
- 问题汇总 (21)
- 异常记录 (20)
- 功能实现 (19)
- 面试总结 (25)
- 技巧总结 (8)
- 常用代码 (4)
- 编程习惯 (3)
- 编码规则 (3)
- java.util (10)
- java.io (1)
- JavaWeb (9)
- MySQL (16)
- SVN (3)
- MyBatis (11)
- Velocity (7)
- 其他知识 (10)
- 人生哲理 (1)
- 人生故事 (1)
- 自我感悟 (1)
- shiro (3)
- 基础知识 (0)
- 问题总结 (1)
- Spring 标签 (1)
- Spring (3)
- 点滴生活 (1)
- DOS (1)
- CAS (4)
- Linux (9)
- Storm (6)
- Shell (1)
- regex (1)
- Collection (4)
- poi (1)
- 经典语句 (1)
- NIO (5)
- concurrent (14)
- RPC (1)
- zookeeper (3)
- 待整理 (2)
- Hadoop (9)
- RabbitMq (2)
- flume (1)
- hive (7)
- hbase (4)
- kafka (1)
- scala (1)
- GC (0)
- java.util.concurrent.atomic (1)
- java.lang.ref (6)
- JVM (2)
- algorithm (1)
- conception (1)
- java key word (1)
- sun.misc (1)
最新评论
问题场景:
项目设计模式: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 中同样要考虑如果发生异常了,该如何处理,跳转哪个页面。
项目设计模式: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 中同样要考虑如果发生异常了,该如何处理,跳转哪个页面。
发表评论
-
Publishing failed with multiple errors file not found
2017-11-10 22:39 879问题场景: Java Web项目 ... -
attempted to return null from a method with a primitive return type (int)
2017-10-25 22:52 3193异常背景 mybatis mapper.xml 中 resul ... -
java.lang.UnsupportedOperationException
2017-10-24 21:42 364异常背景: 遍历集合进行元素删除操作 异常描述: Str ... -
can not find xxx.xxx
2017-10-03 10:20 406问题描述: 单元测试一个已离职同事的接口,运行时提示 po ... -
org.springframework.beans.factory.NoSuchBeanDefinitionException: No bean named '
2017-10-02 18:33 624问题场景: 启动 Tomcat 时报错,org.spring ... -
java.lang.OutOfMemoryError: Java heap space
2017-10-02 18:02 439问题描述: 新来的同事,安装JDK、Eclipse 、Tom ... -
attempted to return null from a method with a primitive return type (double)
2017-09-26 21:58 1532问题场景: 服务启动正常,MyBatis Interface ... -
No matching bean of type dao found for depende
2017-09-26 21:46 856问题场景: 项目设计模式:Spring MVC + MyBat ... -
1030 Got error 28 from storage engine
2016-05-24 22:25 1318现象:调试程序过程中,突然报错,显示数据检索失败,数据库连接超 ... -
org.apache.shiro.session.UnknownSessionException
2015-06-27 18:19 3914问题说明: 背景:系 ... -
java Excel poi exception
2015-06-11 16:41 681一、 问题:java导出Exce ... -
The reference to entity "locale" must end with the ';' delimiter.
2015-06-02 15:12 1823问题: 修改web.xml 文件中的拦击器中的URL后 报错T ... -
xxxList not found
2015-05-20 08:51 671问题:MyBatis接口中以list作为参数类型,在mappe ... -
ERROR: JDWP Unable to get JNI 1.2 environment, jvm->GetEnv() return code = -2 JD
2015-05-17 16:39 605问题:运行单元测试类(比较重载与重写的区别)时报错, ERRO ... -
Result Maps collection already contains value for mapper.XXX
2015-05-14 08:53 2126问题:运行单元测试类时报错 原因:应该用resultMap来 ... -
Unable to find resource
2015-05-13 20:32 739场景: 配合JS调试时,出现上面的异常,且数据可以正常接收,程 ... -
target is null for setProperty
2015-05-13 15:00 727问题:ognl.OgnlException: target i ... -
语法错误,查询条件中带有多余的单引号
2015-05-07 09:27 730场景:列表检索功能,查询条件中带有英文单引号,点击查询,系统异 ... -
unable to install breakpoint in
2015-05-05 16:55 624避免出现这种错误 说明:尝试了多种方式仍然未能解决,与其煞费 ...
相关推荐
### Struts2框架中“No result defined for action and result input”错误解析及解决方法 #### 错误概述 在Struts2框架中开发Web应用程序时,可能会遇到一个名为“No result defined for action and result input...
在IT领域,尤其是在Web开发中,遇到“No result defined for action”这类错误是常见的问题,尤其当使用Struts2框架时更为突出。此类错误通常指向在控制器(Action)中未正确配置或实现结果集(Result),导致请求...
No result defined for action cn.itcast.user.web.action.UserAction and result error ``` 此异常表明在`struts.xml`中没有为指定的动作定义结果。例如,如果期望动作在发生错误时转向特定的JSP页面,但配置文件...
错误信息:“No result defined for action com.upload.UploadAction and result input”。 这个错误通常是由于配置文件中没有正确定义动作的结果导致的。确保在`struts.xml`中为每个动作定义了合适的`result`标签...
在提供的内容中提到了一个错误 `No result defined for action com.sxit.smxt.action.XXXAction and result input`。这意味着Struts2框架无法找到对应Action的`input`结果定义。 #### 解决方案: - **检查配置文件*...
No result defined for action ***Action and result success **问题描述**: 当执行某个Action后,出现“没有定义success结果”的错误。 **解决方法**: 这意味着在`struts.xml`中未正确配置`success`结果。为了...
### 错误八:No result defined for action... and result... 这类错误通常出现在Struts框架中,当在一个动作中定义的结果没有在配置文件(如struts.xml)中正确配置时发生。确保每个动作的结果都在配置文件中有...
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 ...
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 ...
- 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 ...
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...
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 ...
(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....
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 ...
- 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#...
- 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 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 ...
集合了 所有的 Unix命令大全 ...telnet 192.168.0.23 自己帐号 sd08077-you0 ftp工具 192.168.0.202 tools-toolss ... 各个 shell 可互相切换 ksh:$ sh:$ csh:guangzhou% bash:bash-3.00$ ... 命令和参数之间必需用空格隔...
+ 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 ...