When I try to populate a bean via "BeanUtil.populate"
I receive an error (the error is in the end of the mail) when the application tries to set a specific property:
private java.util.Date date;
public void setDate(Date date)
{
this.date = date;
}The value I'm rying to set is a java.sql.Timestamp (that extends java.util.Date).
If I change the set method to receive an Objet instead of a Date the application works (If I change to timesatamp I still receive the same error).
Caused by: java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
at org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
at br.com.db.bean.DBBeanInfo$DBBeanResultSetParser.parse(DBBeanInfo.java:125)
[]s Freddy ---------------------------------------------------------------- Frederico Silva Guimar�es Tel: (21) 9952-1717 ICQ: 127277403 Email: [EMAIL PROTECTED] ----------------------------------------------------------------
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
