Re: [Strutsgenerator-user] argument type mismatch
Brought to you by:
javanovic
|
From: Juan P. M. <ju_...@ho...> - 2003-04-18 18:45:15
|
It is indeed the latest build, taken from CVS. Looking into it, I think
I found what could be a fix:
In DAO.java, line 44 it reads
BeanUtils.populate(bean, properties);
However, that method is intended for use with web request parameters,
and cannot distinguish between a date and a String (it can, however tell
a number form a String, and that's why it works with numbers and not
dates) it could be changed for
PropertyUtils.copyProperties(bean, properties);
Does anybody see hidden side effects that would make this solution
undesirable?
Thanks
Juan Pablo Morales
Bernardinus wrote:
>Hi Juan,
>
>Are you using the latest build? I think there were talks on this issue back
>sometime ago, and may have been fixed then. I don't know if that is the
>case, but checking out cvs code may help.
>
>cheers,
>/bernard
>
>----- Original Message -----
>From: "Juan Pablo Morales" <ju-...@un...>
>To: <str...@li...>
>Sent: Tuesday, April 15, 2003 10:52 AM
>Subject: [Strutsgenerator-user] argument type mismatch
>
>
>
>
>>First thanks for such a great product.
>>
>>I have used StrutsGenerator and have generated the whole directory from
>>the database, but whenever I try to perform any operation that involves
>>a date field I get the message
>>
>>22:36:47,594 ERROR [STDERR] java.lang.IllegalArgumentException: Cannot
>>invoke calendar.backend.model.Events.setFechaFin - argument type mismatch
>>22:36:47,599 ERROR [STDERR] at
>>
>>
>>
>org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBea
>n.java:1767)
>
>
>>22:36:47,601 ERROR [STDERR] at
>>
>>
>>
>org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUti
>lsBean.java:1748)
>
>
>>22:36:47,603 ERROR [STDERR] at
>>
>>
>>
>org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUti
>lsBean.java:1643)
>
>
>>22:36:47,604 ERROR [STDERR] at
>>
>>
>>
>org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean
>.java:1672)
>
>
>>22:36:47,606 ERROR [STDERR] at
>>
>>
>>
>org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:10
>31)
>
>
>>22:36:47,607 ERROR [STDERR] at
>>
>>
>>
>org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:820)
>
>
>>22:36:47,609 ERROR [STDERR] at
>>org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:343)
>>22:36:47,610 ERROR [STDERR] at
>>calendar.backend.dao.DAO.populate(DAO.java:39)
>>
>>
>>When I look into BeanUtils I see that it gets the date, namely
>>2003-09-03 as a String, instead of as a java.util.Date. Has anybody
>>experienced this problem?
>>
>>
>>Thanks
>>
>>Juan Pablo Morales
>>
>>
|