Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 41620 invoked from network); 1 Apr 2004 23:12:35 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 1 Apr 2004 23:12:35 -0000 Received: (qmail 63783 invoked by uid 500); 1 Apr 2004 23:12:04 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 63769 invoked by uid 500); 1 Apr 2004 23:12:04 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Struts Users Mailing List" Reply-To: "Struts Users Mailing List" Delivered-To: mailing list user@struts.apache.org Received: (qmail 63756 invoked from network); 1 Apr 2004 23:12:04 -0000 Received: from unknown (HELO mx5.nyu.edu) (128.122.109.25) by daedalus.apache.org with SMTP; 1 Apr 2004 23:12:04 -0000 Received: from nyu.edu (ELVIS.ADMIN.SCPS.NYU.EDU [128.122.40.132]) by mx5.nyu.edu (8.12.10/8.12.9) with ESMTP id i31NC9Yn002021 for ; Thu, 1 Apr 2004 18:12:09 -0500 (EST) Message-ID: <406CA1C9.5000702@nyu.edu> Date: Thu, 01 Apr 2004 18:12:09 -0500 From: Paul Barry Reply-To: paul.barry@nyu.edu Organization: NYU SCPS OIT User-Agent: Mozilla Thunderbird 0.5 (Windows/20040207) X-Accept-Language: en-us, en MIME-Version: 1.0 To: user@struts.apache.org Subject: BeanUtils.copyProperties() throws java.lang.IllegalArgumentException: No origin bean specified Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N 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