struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Barry <paul.ba...@nyu.edu>
Subject Re: BeanUtils.copyProperties() throws java.lang.IllegalArgumentException: No origin bean specified
Date Fri, 02 Apr 2004 15:07:15 GMT
Yeah, it was actually my dao that returning a null UserBO.  Makes since, 
sense user is the origin.

Marco Mistroni wrote:

> Hi,
> 	Make sure that the userForm is not null..
> I m using BeanUtils.copyProperties all the time and it
> Just work fine
> 
> Hope this helps
> 
> Regards
> 	marco
> 
> -----Original Message-----
> From: Paul Barry [mailto:paul.barry@nyu.edu] 
> Sent: 02 April 2004 00:12
> To: user@struts.apache.org
> Subject: BeanUtils.copyProperties() throws
> java.lang.IllegalArgumentException: No origin bean specified
> 
> I am trying to use BeanUtil.copyProperties() as described in 5.6.7 in 
> "Struts in Action" (Husted).  I have an Interface UserBO which my 
> ActionForm implements.  I also have a standard JavaBean UserBOImpl which
> 
> implements the Interface.  I have a DAO that returns a UserBOImpl.  I 
> would like to use BeanUtils.copyProperties() to copy all of the 
> UserBOImpl properties into the ActionForm.  So I am trying this code in 
> the execute method of my Action:
> 
> UserBO user = dao.getUser(myForm.getId());
> UserBO userForm = (UserBO)form;
> BeanUtils.copyProperties(userForm,user);
> 
> myForm is just the ActionForm cast into the ActionForm I wrote that 
> implements UserBO.  This code compiles, but when it runs I get a 
> java.lang.IllegalArgumentException: No origin bean specified.  Does 
> anyone know why I am getting this error?  Is anyone else doing something
> 
> like this?  Anyone getting this error?
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 

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


Mime
View raw message