commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alin Dosoniu" <adoso...@hotmail.com>
Subject Fw: Beanutils: cannot copy a Timestamp attribute when it is null
Date Wed, 15 Dec 2004 11:37:36 GMT
I made more investigations and found out that the  PropertyUtils.copyProperties is working
fine even when the Timestamp attribute has the null value. 

Alin.



Hi,

I have a bean with an attribute with java.sql.Timestamp type.
Using BeanUtils.copyProperties method I get 

org.apache.commons.beanutils.ConversionException: No value specified
 at org.apache.commons.beanutils.converters.SqlTimestampConverter.convert(SqlTimestampConverter.java:103)
 at org.apache.commons.beanutils.BeanUtilsBean.copyProperty(BeanUtilsBean.java:444)
 at org.apache.commons.beanutils.BeanUtilsBean.copyProperties(BeanUtilsBean.java:261)
 at org.apache.commons.beanutils.BeanUtils.copyProperties(BeanUtils.java:114)

every time when I try to copy a bean with the attribute with Timestamp with null value. It
works fine if the attribute has a value different than null.I tried the same scenario with
an attribute with String type. It works ok even if the attribute has the null value.

I think this is a bug, isn't? 

Thanks,
Alin.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message