首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > J2EE开发 >

java.lang.IllegalArgumentException: argument type mismatch,该如何解决

2012-12-23 
java.lang.IllegalArgumentException: argument type mismatch两个类:user{Date birthday}FormBean{Strin

java.lang.IllegalArgumentException: argument type mismatch
两个类:
user{
Date birthday;
}

FormBean{
String birthday;
}

方法中:
FormBean fb = new FormBean();
fb.setBirthday("2012-11-12");

User user = new User();
ConvertUtils.register(new DateLocaleConverter(), Date.class);
BeanUtils.copyProperties(user, ufb);

最后一行执行出错,异常如题目。
[解决办法]
BeanUtils.copyProperties(user, ufb);参数类型不匹配,ufb哪里来的

热点排行