struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Laurie Harper <>
Subject Re: Beanutils.copyproerties problem
Date Fri, 27 Apr 2007 20:51:06 GMT
opentotech wrote:
> Hi techies,
> I have a problem with Beanutils.copyproperties. I have a jsp with a
> <html:select multiple="true" property="practices"/> I know in action I will
> be getting an array of practices. I am using LazyValidatorForm. In my GP
> object I have an array of practices. Practice[] practices. I am using
> Beanutils.copyproperties to copy from form to GP object. But I am getting
> the following error:
> java.lang.IllegalArgumentException: Cannot invoke
> com.mwcs.par.Gp.setPractices - argument type mismatch
 > [...]
> can anyone help me out to solve this problem. I have searched many forums
> and I cant find an answer for this.

There's not enough information here to solve the problem. What argument 
type does setPractices() expect? What does your form class look like? 
How are you using BeanUtils.copyProperties?

My guess is that you're trying to pass String-based form data into 
something that expects typed data -- e.g. you're trying to set a String 
array on something that wants a Practice array or something similar.

In that case, you would need to create and register a BeanUtils 
converter class that knows how to go from String to Practice (or 
whatever the case may be).


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message