Return-Path: Delivered-To: apmail-struts-user-archive@www.apache.org Received: (qmail 25011 invoked from network); 21 Mar 2006 19:54:52 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 21 Mar 2006 19:54:52 -0000 Received: (qmail 15383 invoked by uid 500); 21 Mar 2006 19:54:43 -0000 Delivered-To: apmail-struts-user-archive@struts.apache.org Received: (qmail 15356 invoked by uid 500); 21 Mar 2006 19:54:43 -0000 Mailing-List: contact user-help@struts.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 15345 invoked by uid 99); 21 Mar 2006 19:54:42 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2006 11:54:42 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of niall.pemberton@gmail.com designates 64.233.162.201 as permitted sender) Received: from [64.233.162.201] (HELO zproxy.gmail.com) (64.233.162.201) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Mar 2006 11:54:42 -0800 Received: by zproxy.gmail.com with SMTP id x7so1527815nzc for ; Tue, 21 Mar 2006 11:54:21 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kPRkF0ChDses9pZogl8XRECjp/hRdF/YX8PvYIfy465HT+1Gim3RNTeH+BdS1AoYw90M6dak1nrNbmnyVpQ6VxTS7VDzNP7Hf6/53MHKw08mjzFNhMw+3pp9NhiVknKygH8EGUCZrPfF2fau+8asrBBpOIhP2b7EU0hKagpT0cQ= Received: by 10.35.107.20 with SMTP id j20mr116297pym; Tue, 21 Mar 2006 11:54:21 -0800 (PST) Received: by 10.35.79.3 with HTTP; Tue, 21 Mar 2006 11:54:21 -0800 (PST) Message-ID: <55afdc850603211154o4cb61057n6ec1bc6de2726c7f@mail.gmail.com> Date: Tue, 21 Mar 2006 19:54:21 +0000 From: "Niall Pemberton" To: "Struts Users Mailing List" Subject: Re: LazyValidatorForm FormFile instantiation exception In-Reply-To: <44205007.3050503@vailsys.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <44205007.3050503@vailsys.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N The basic LazyDynaBean implementation tried to be smart about instantiating objects - so that people's regular POJO beans would get automtaically created. In hindsight IMO this was a mistake. It is however easy to remedy - by overriding the createOtherProperty() method - see the "4. Automatic Property Instantiation" section here: http://www.niallp.pwp.blueyonder.co.uk/lazydynabean.html So if you want you can create a custom LazyDynaBean with this behaviour. However, if you want this in LazyValidatorForm - you'll then need to plug that DynaBean implementation into your own LazyValidatorForm implementation - which is also pretty straight forward: http://www.niallp.pwp.blueyonder.co.uk/lazyactionform.html#section4 Niall On 3/21/06, David Durham wrote: > Hi, > > I've got a form-bean definition like so: > > type=3D"org.apache.struts.validator.LazyValidatorForm"> > type=3D"org.apache.struts.upload.FormFile"/> > ... > > > When I load the page the first time, I get an instantiation exception: > > java.lang.InstantiationException: org.apache.struts.upload.FormFile > > It doesn't seriously affect the application, but I'm curious about the > solution to this problem. I searched the user@struts archives but > didn't find this issue referenced. Is there some way to set an inital > value to null? Maybe that would solve the problem? > > Thanks, > > Dave --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@struts.apache.org For additional commands, e-mail: user-help@struts.apache.org