commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebty <seb...@laposte.net>
Subject [BeanUtils] LocaleBeanUtils for Date conversion
Date Mon, 31 May 2004 12:28:33 GMT

Hi

I would like to use the class LocaleBeanUtils to set a Date property.
I don t understand how it works exactly and i don t find any examples in 
the documentation.

With this code (birthDate is a Date property of the customer object) :

LocaleBeanUtils.setProperty(customer,"birthDate","12/10/1974","dd/mm/yyyy");

I obtain the following error :

java.lang.IllegalArgumentException: argument type mismatch
     at java.lang.reflect.Method.invoke(Native Method)
     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.locale.LocaleBeanUtils.invokeSetter(LocaleBeanUtils.java:758)
     at 
org.apache.commons.beanutils.locale.LocaleBeanUtils.setProperty(LocaleBeanUtils.java:567)

Can somebody explain this behaviour?

Much thanks in advance!
Seb



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message