could not find a getter for ... in class ...
来源:互联网 发布:angularjs源码分析 编辑:程序博客网 时间:2024/06/06 20:02
错误描述:SSH框架中 bean里明明有get方法却报could not find a getter for ... in class ...
解决办法:可能原因如下:
1.真的没有写getter方法(发生几率:小)
2.*.hmb.xml文件中的属性名和pojo不一致(*.hbm.xml和*.java没衔接好,不一致),字段属性没有正确配置,比如,*.hmb.xml中*.java的地址要明确(明确指出引用包的完整路径);映射错误;有多个主键时,对生成的联合主键配置错误;拼写错误(包括多空格)等(发生几率:大)
3.方法写错/方法名写错,要按照javabean的书写规范写啊,要不然打死也找不到哪儿错了(发生几率:大)
这里提一下:get/set是不是不允许方法名中有连续两个大写字母,例如
public String getODPType(){
return this.oDPType;
}
出现缺少标识符,数字等错误 检查js中的方法结尾是否有逗号
public void setODPType(String oDPType){
this.oDPType = oDPType;
}
这样写它就会报错,报找不到getter for oDPType的错误,但下面这样写就可以了
public String odpType;
public String getOdpType(){
return this.odpType;
}
public void setOdpType(String odpType){
this.odpType = odpType;
}
4.其他不明原因(发生几率:小)
type="redirect" 对于刷新再次提交的 加重定向
No result defined for action * and result input
from中的参数类型与Action中的参数类型转换失败
断点卡住 考虑是不是相互调用了
注意bean中的字段的第二个字母不能大写。
- could not find a getter for in class方法解决
- could not find a getter for ... in class ...
- Could not find a getter for salesName in class
- could not find a getter for ... in class ...
- could not find a getter for ... in class ...
- Hibernate: Could not find a getter for **** in class
- Could not find a getter for.. in class.. 异常原因
- org.hibernate.PropertyNotFoundException: Could not find a getter for titlse in class com.po.Intro
- org.hibernate.PropertyNotFoundException: Could not find a getter for titlse in class com.po.Intro异常
- could not find a getter for ... in class ... 异常的解决
- hibernate出现:org.hibernate.PropertyNotFoundException: Could not find a getter for id in class
- could not find a getter for ... in class ... 异常的原因解析
- org.hibernate.PropertyNotFoundException: Could not find a getter for empDeptId in class
- org.hibernate.PropertyNotFoundException Could not find a getter for id in class
- Debug:SSH继承时 could not find a getter for ... in class ... 异常的解决
- could not find a getter for ... in class ... 异常的解决
- could not find a getter for ... in class ... 异常的解决
- org.hibernate.PropertyNotFoundException: Could not find a getter for id in class com.pb.dao.UserDao
- .net 伪原创代码 同义词替换
- 文本框光标位置移动
- Android Sample学习——NotePad
- Linux内核Makefile文件
- 关于建立时间和保持时间
- could not find a getter for ... in class ...
- 递归遍历某文件夹下所有文件的算法
- 虚函数,纯虚函数相关
- 使用C#旋转图像
- FireFox中得到file控件取到客户端文件的完整路径
- POJ1018Communication System题解动态规划DP
- [转]RTSP服务器处理客户端点播的基本流程
- MEF程序设计指南九:重组(Recomposition)MEF部件
- 折腾 Win7