Method "setAge" failed for object action.RegistAction@1f05562b [java.lang.No....
大家好,如果大家看到了这篇文字。我觉得大家应该是遇到了该类问题。
首先,NullPointerException 空指针异常。
其次,大家应该是是在使用struts2和hibernate的使用遇到的这个问题。
把pojo文件修改一下
一般是将int修改成Integer就可以了。
(建议都使用包装类)
例如:
你的pojo中有个age属性,并且生成了seter和geter。
那么这个异常会出现在set方法中,因为我们从页面中获得数据是string类型的。
会提示没有set(java.lang.String)方法。
Method "setAge" failed for object action.RegistAction@1f05562b [java.lang.No....的更多相关文章
- Struts2报错异常Method "setUser" failed for object com.mikey.action.ConverterAction@dd34285
在写类型转换的时候发现报错 异常信息 ognl.MethodFailedException: Method "setUser" failed for object com.mike ...
- 解决spring mvc 上传报错,Field [] isn't an enum value,Failed to convert value of type 'java.lang.String[]' to required type '
没有选择附件,但是点击上传按钮的时候会报错. 之前不选择文件,直接上传空文件是可以的,后来不知道改了什么就不行了. 错误信息: -- :: [http--] TRACE org.springframe ...
- Jmeter报错之jmeter.gui.action.ActionRouter: Error processing gui.action.Start@1b7c473a java.lang.ArrayIndexOutOfBoundsException
一个使用了很久的Jmeter脚本,运行时Jmeter的UI界面上点击绿色按钮后,完全无反应,只有log报错,如下: 2017/06/28 14:29:23 ERROR - jmeter.gui.act ...
- MapReduce在集群执行任务时报错:Initialization of all the collectors failed. Error in last collector was:java.lang.ClassCastException
报错信息详细: Error: java.io.IOException: Initialization of all the collectors failed. Error in last colle ...
- Error invoking SqlProvider method (com.github.abel533.mapper.MapperProvider.dynamicSQL). Cause: java.lang.InstantiationException: com.github.abel533.mapper.MapperProvider
org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.apache.i ...
- Spring MVC exception - Invoking request method resulted in exception : public static native long java.lang.System.currentTimeMillis()
最近在线上系统发现下面的异常信息: 2014-10-11 11:14:09 ERROR [org.springframework.web.servlet.mvc.annotation.Annotati ...
- Failed to convert value of type 'java.lang.String' to required type 'java.time.LocalDate';
springboot jdbc查询使用LocalDate报:Failed to convert value of type 'java.lang.String' to required type 'j ...
- SpringBoot 项目启动 Failed to convert value of type 'java.lang.String' to required type 'cn.com.goldenwater.dcproj.dao.TacPageOfficePblmListDao';
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'tac ...
- 完美解决报错Failed to convert value of type 'java.lang.String' to required type 'java.util.Date'
Failed to convert value of type 'java.lang.String' to required type 'java.util.Date' 首先这个错误的意思是 前台页面 ...
随机推荐
- java学习一目了然——File类文件处理
java学习一目了然--File类文件处理 File类(java.io.File) 构造函数: File(String path) File(String parent,String child) F ...
- Android小代码——设置全屏
1: public class MainActivity extends Activity { 2: @Override 3: public void onCreate(Bundle savedIns ...
- Oracle EBS-SQL (PO-18):检查工作台下达的PR在系统找不到.sql
select * From apps.po_requisitions_interface_all---------------------------------------------------- ...
- Inno Setup技巧[实例]添加自定义页面
原文 http://hi.baidu.com/watashi/item/b3dda993459ff8f0291647a0 通过“添加自定义页面”可以丰富安装程序的功能.本文以添加一个页面“选择安装类型 ...
- 栈的C数组实现
栈是一种先进后出的数据结构.栈的基本操作包括:入栈,出栈,初始化栈,清空栈,遍历栈. C代码如下: #include <stdio.h> #define MaxSize 20 typede ...
- linux下自动同步internet时间
linux下很简单直接一句即可: ntpdate time.nist.gov ntp后面参数为internet时间服务器url或ip即可. 但是ntpdate命令需要root特权,如果做成自动运行每次 ...
- [网络分析]WEBQQ3.0协议分析---good good study
声明:研究学习使用,严禁商业化~~噗嗤,估计也没有商业化的 本文地址:http://blog.csdn.net/sushengmiyan/article/details/11906101 作者:sus ...
- 找出诡异的Bug:数据怎么存不进去
带着学生做课程设计.程序一大,课程中做过了小项目,练过了分解动作,一到合起来了,难免还是要乱了分寸.事实上,实战的功夫,就是这样出来的.(课程设计指导视频链接(第36课时,3.18 银行系统开发).课 ...
- RMAN备份之丢失数据文件及控制文件的恢复
About Recovery with a Backup Control FileIf all copies of the current control file are lost or damag ...
- .net TxetBox控件设置ReadOnly=True后台取值问题
1.为TxetBox添加onfocus=this.blur()进行模拟 2.通过 Request.From["TextBox"].Trim()取值; 3.后台CS文件设置TextB ...