Return-Path: Delivered-To: apmail-commons-user-archive@www.apache.org Received: (qmail 91508 invoked from network); 21 Sep 2007 15:38:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Sep 2007 15:38:47 -0000 Received: (qmail 94343 invoked by uid 500); 21 Sep 2007 15:38:33 -0000 Delivered-To: apmail-commons-user-archive@commons.apache.org Received: (qmail 94289 invoked by uid 500); 21 Sep 2007 15:38:33 -0000 Mailing-List: contact user-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list user@commons.apache.org Delivered-To: moderator for user@commons.apache.org Received: (qmail 436 invoked by uid 99); 17 Sep 2007 21:54:19 -0000 X-ASF-Spam-Status: No, hits=-2.5 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_SOFTFAIL,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sumesh.madisetti@citi.com designates 199.67.179.106 as permitted sender) X-MimeOLE: Produced By Microsoft Exchange V6.0.6619.12 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: BeanUtils setProperty IllegalArgumentException: Null property value for property Date: Mon, 17 Sep 2007 17:53:36 -0400 Message-ID: <7777616F99DFD94BB454020F2BB70B3003A25858@EXNJMB70.nam.nsroot.net> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: BeanUtils setProperty IllegalArgumentException: Null property value for property Thread-Index: Acf5X+ajyG7sQCTsRHeRQygGWDlDTQAEKBAgAAAm0JA= From: "Madisetti, Sumesh " To: "Jakarta Commons Users List" X-OriginalArrivalTime: 17 Sep 2007 21:53:37.0269 (UTC) FILETIME=[336E1250:01C7F975] X-Scanned-By: MIMEDefang 2.52 on 172.27.136.25 X-Virus-Checked: Checked by ClamAV on apache.org Apologies for misleading you - for some reason I thought you were using = digester. Playing with this I see that you have to set the City first or you need = to instantiate City as in -=20 public class Address { private City city =3D new City(); -----Original Message----- From: N=E9stor Bosc=E1n [mailto:nestor.boscan@tcs.com.ve]=20 Sent: Monday, September 17, 2007 5:22 PM To: 'Jakarta Commons Users List' Subject: RE: BeanUtils setProperty IllegalArgumentException: Null = property value for property I don't see anywhere in the code that PropertyUtils access a Digester. = In the code it clearly shoes that it access an attribute, if it's null = an exception is thrown. It does not check or tries to instantiate the = object. Regards, N=E9stor Bosc=E1n=20 -----Mensaje original----- De: jcarman@carmanconsulting.com [mailto:jcarman@carmanconsulting.com] = En nombre de James Carman Enviado el: Lunes, 17 de Septiembre de 2007 = 03:25 p.m. Para: Jakarta Commons Users List Asunto: Re: BeanUtils setProperty IllegalArgumentException: Null = property value for property Who said anything about Digester? On 9/17/07, Madisetti, Sumesh wrote: > Your digester rules files should be as follows - > > The following digester file will parse the content below and return=20 > you an Address object with a City object inside it and the name of it set to = NYC. > > > > > > > > > > > > > Content- >
> NYC >
> > > -----Original Message----- > From: N=E9stor Bosc=E1n [mailto:nestor.boscan@tcs.com.ve] > Sent: Friday, September 14, 2007 9:38 PM > To: user@commons.apache.org > Subject: BeanUtils setProperty IllegalArgumentException: Null property = > value for property > > Hi > > I suppose that this has been asked and answered before but I can't=20 > find the solution. I have some classes like this: > > public class Address { > private City city; > > public City getCity () { return city; } > > public void setCity (City city) { this.city =3D city; } } > > public class City { > private String name; > > public String getName ( return name; } > > public void setName (String name) { this.name =3D name; } } > > And I'm trying to set the city's name like this: > > PropertyUtils.setProperty (address, "city.name", "Toronto"); > > And I'm getting IllegalArgumentException: Null property value for = 'name'. > > Now I checked the 1.6 BeanUtils code and it doesn't instantiate the=20 > class anywhere. Is this something that BeanUtils does?. If not does anybody = knows another technology that can do this? > > Regards, > > N=E9stor Bosc=E1n > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscribe@commons.apache.org > For additional commands, e-mail: user-help@commons.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@commons.apache.org For additional commands, e-mail: user-help@commons.apache.org