Hi

I am new to BeanUtils so maybe it is a bad comprehension. I check the mail 
archive but found nothing about it.

I try to use BeanUtils to initialize an object. The object definition is 
the next :

public class Service extends ElementBouquet implements Serializable
{
    private String urlTraitement;
    private String urlConfiguration;
    private Iterator iterator;
    private Collection mesPages;

    /* constructor, getter and setter */
}

So I call :
BeanUtils.setProperty( orig, (String) attrName, voDesc.get( attrName ) );

Where attrName is the key of the attribut  in the Map instanciate with :
Map voDesc = BeanUtils.describe(valueObject);

It works fine with my urlTraitement, urlConfiguration, iterator properties 
but for mesPages I have the following error :

java.lang.IllegalArgumentException: Cannot invoke 
com.arsoe.trelaze.socle.bouquetservice.Service.setMesPages - argument type 
mismatch
        at 
org.apache.commons.beanutils.PropertyUtilsBean.invokeMethod(PropertyUtilsBean.java:1766)
        at 
org.apache.commons.beanutils.PropertyUtilsBean.setSimpleProperty(PropertyUtilsBean.java:1747)
        at 
org.apache.commons.beanutils.PropertyUtilsBean.setNestedProperty(PropertyUtilsBean.java:1642)
        at 
org.apache.commons.beanutils.PropertyUtilsBean.setProperty(PropertyUtilsBean.java:1671)
        at 
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1063)
        at 
org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:358)
        at 
com.arsoe.trelaze.socle.metier.BusinessObject.fusionner(BusinessObject.java:70)

Is it a normal behavior or I really do an error ?
Is it really the good methods to copy an attribut from a class to an other 
or I must do something else ?

Thanks for help
Nicolas



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to