Struts has detected an unhandled exception错误原因及解决方法
来源:互联网 发布:数据统计图种类 编辑:程序博客网 时间:2024/05/17 06:20
使用Struts2进行开发时,经常会遇到下面这样的问题:
Struts Problem ReportStruts has detected an unhandled exception:
而问题的原因可能有很多,但是一般来说都是因为运行时遇到了不能识别的标识的错误,包括类名,路径名,方法名等,只要按照具体的错误提示内容仔细检查整个页面的运行流程涉及到的程序代码,就可以找出错误的原因了。
如下面遇到了该错误信息:
首先显示
Struts Problem ReportStruts has detected an unhandled exception:
可以发现是这类错误,然后下面继续有详细的错误提示:
Unresolved compilation problems: Question cannot be resolved to a type questions cannot be resolvedCould not instantiate bean class [com.exam.student.actions.UploadAction]: Constructor threw exception; nested exception is java.lang.Error: Unresolved compilation problems: Question cannot be resolved to a type questions cannot be resolved
由此可以发现应该是Question相关的变量questions的类型没有定义好,于是找到上面提示的UploadAction查看,发现
private List questions;
这里忘记了些List的类型,应该改成这样:
private List<Question> questions;
为了确保正确修改,重新部署项目,正常访问。
遇到这类问题只能根据详细的提示信息查找相关代码仔细的检查了,包括看看有没有拼写错误,路径有没有写错,方法名,或是重启服务器,重新部署。
0 0
- Struts has detected an unhandled exception错误原因及解决方法
- Struts has detected an unhandled exception
- Struts has detected an unhandled exception
- SSH:Struts has detected an unhandled exception
- Struts Problem Report Struts has detected an unhandled exception:
- Struts Problem Report Struts has detected an unhandled exception:
- 关于Struts has detected an unhandled exception这个异常
- Struts has detected an unhandled exception: Messages: Bean named
- Struts has detected an unhandled exception非常诡异现象
- (crm-bug)Struts has detected an unhandled exception
- struts2漏铜升级jar包报错 解决-Struts Problem Report Struts has detected an unhandled exception
- Struts Problem Report Struts has detected an unhandled exception: Messages: node to traverse cann
- struts2异常:Struts Problem Report Struts has detected an unhandled exception: Messages: could not in
- ruts has detected an unhandled exception: Messages: There is no Action mapped for namespace / and action name hello.
- Event Code: 3005 An unhandled exception has occurred.
- unhandled event loop exception eclipse/An error has occurred.See the log file终于找到解决方法了
- JVM崩溃的原因及解决!An unexpected error has been detected by HotSpot Virtual Machine
- vs2033安装遇到an unhandled exception has been caught by the vsw exception filter
- iOS UIStoryBoard使用笔记(一)
- pl.plot()命令不能直接出图的解决方案
- boost asio异步读写网络聊天程序客户端 实例详解
- 取mysql数据库表中字段语句
- iOS中编码转化
- Struts has detected an unhandled exception错误原因及解决方法
- Binlog has bad magic number; It's not a binary log file that can be used by this version of MySQL
- JQuery判断DropDownList 取值
- 程序员赚钱致富的6种方法
- XML与HTML区别,XML解析
- 今日遇到一问题,甚是定奇怪,我将文件名改为小写,系统便能加载上,但为何这样呢?
- 《unix编程艺术》读后感
- //对中文键盘输入英文 (去除中文系统自带的UTF8编码)
- ubuntu下7z文件的压缩与解压