You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Alin Dosoniu <ad...@hotmail.com> on 2004/12/15 12:24:39 UTC
Beanutils: cannot copy a Timestamp attribute when it is null
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.