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:[EMAIL PROTECTED] 
Sent: 02 April 2004 00:12
To: [EMAIL PROTECTED]
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


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

Reply via email to