I am using commons-beanutils 1.8.3 and and Date properties as java.util.Date.
When i am trying to copy Source to destination it's unable to copy date properties.
Following shows my previous issue but no one give the correct answer for me.
as a example my date value in source bean is Wed May 15 15:46:04 IST 2013, but BeanUtils unable to copy this to destination...
This is the way I was able to solve the issue.
public static void copyProperties(Object src, Object dest) throws IllegalAccessException,
InvocationTargetException, NoSuchMethodException {
java.util.Date defaultValue = null;
Converter converter = new DateConverter(defaultValue);
BeanUtilsBean beanUtilsBean = BeanUtilsBean.getInstance();
beanUtilsBean.getConvertUtils().register(converter, java.util.Date.class);
BeanUtils.copyProperties(dest, src);
}