Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 38535 invoked from network); 1 Sep 2004 22:36:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 1 Sep 2004 22:36:18 -0000 Received: (qmail 44767 invoked by uid 500); 1 Sep 2004 22:36:11 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 44719 invoked by uid 500); 1 Sep 2004 22:36:10 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 44706 invoked by uid 99); 1 Sep 2004 22:36:10 -0000 X-ASF-Spam-Status: No, hits=1.4 required=10.0 tests=DNS_FROM_RFC_ABUSE,FROM_ENDS_IN_NUMS,HTML_20_30,HTML_MESSAGE,HTML_NONELEMENT_20_30 X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [216.136.172.74] (HELO web11708.mail.yahoo.com) (216.136.172.74) by apache.org (qpsmtpd/0.28) with SMTP; Wed, 01 Sep 2004 15:36:06 -0700 Message-ID: <20040901223605.27681.qmail@web11708.mail.yahoo.com> Received: from [12.110.19.97] by web11708.mail.yahoo.com via HTTP; Wed, 01 Sep 2004 15:36:05 PDT Date: Wed, 1 Sep 2004 15:36:05 -0700 (PDT) From: b p Subject: RE: betwix help needed, can't make run a very simple app! To: Jakarta Commons Users List In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1306755254-1094078165=:27310" X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N --0-1306755254-1094078165=:27310 Content-Type: text/plain; charset=us-ascii I think you are missing some elements in your xml. Try reading this in: The reason being that the Races bean maps to xml element races. The Races bean has a property races (thus the nested "races" element in the XML). The property "races" is the array which consists of multiple Race beans.. -Brian Esteban Lorenzano wrote: Brian, thanks for de answer... but the problem is still there :( The "Races" bean is correct (btw, I also did some tests changing Collection types, and nothing). The "Races" bean definition is here (as I said, it is a very simple bean): public class Races { private ArrayList races = new ArrayList(11); public Races() { } public ArrayList getRaces() { return races; } public void addRace(Race race) { races.add(race); } } any idea? Thanks -----Mensaje original----- De: b p [mailto:trashspam2001@yahoo.com] Enviado el: Mi�rcoles, 01 de Septiembre de 2004 04:37 p.m. Para: Jakarta Commons Users List Asunto: Re: betwix help needed, can't make run a very simple app! Does your Races bean have an adder of the correct form? Should follow the pattern: public class SomeBean { public getFoo*(); public void addFoo( foo); } See the "Using Adder Methods For Composite Properties" section at http://jakarta.apache.org/commons/betwixt/guide/binding.html for a full description. -Brian Esteban Lorenzano wrote: Hi all, Please, I need some help here. I have an application, and I want to migrate all the configuration to xml, and parse with betwixt, but I can't make work a very-very simple problem: The xml to parse is: The code to parse is the following: BeanReader beanReader = new BeanReader(); beanReader.registerBeanClass("races", Races.class); beanReader.registerBeanClass("races/race", Race.class); Races races = (Races) beanReader.parse(FileProvider.getSystemFile(fileName).getInputStream()); The parsing is successful, and a "Races" object is created, but the collection with races is empty :-( What can be happening? Thanks in advance, Esteban Pd: sorry if my English is not cool... I'm not a speaker --------------------------------- Do you Yahoo!? Yahoo! Mail - 50x more storage than other providers! --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org --------------------------------- Do you Yahoo!? Win 1 of 4,000 free domain names from Yahoo! Enter now. --0-1306755254-1094078165=:27310--