Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 3237 invoked from network); 23 Jul 2003 10:50:53 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 23 Jul 2003 10:50:53 -0000 Received: (qmail 26133 invoked by uid 97); 23 Jul 2003 10:53:25 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 26126 invoked from network); 23 Jul 2003 10:53:24 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 23 Jul 2003 10:53:24 -0000 Received: (qmail 2992 invoked by uid 500); 23 Jul 2003 10:50:49 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 2962 invoked from network); 23 Jul 2003 10:50:49 -0000 Received: from smtp017.mail.yahoo.com (216.136.174.114) by daedalus.apache.org with SMTP; 23 Jul 2003 10:50:49 -0000 Received: from unknown (HELO yahoo.co.uk) (james?strachan@217.204.102.101 with plain) by smtp.mail.vip.sc5.yahoo.com with SMTP; 23 Jul 2003 10:50:48 -0000 Date: Wed, 23 Jul 2003 11:50:41 +0100 Subject: Re: Posssible bug in Betwixt alpha Content-Type: multipart/alternative; boundary=Apple-Mail-43--954136793 Mime-Version: 1.0 (Apple Message framework v552) From: James Strachan To: "Jakarta Commons Developers List" In-Reply-To: <000001c350a5$2a8ac7f0$6cf83c0a@beasys.com> Message-Id: <8101E022-BCFB-11D7-80B4-000A959D0312@yahoo.co.uk> X-Mailer: Apple Mail (2.552) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N --Apple-Mail-43--954136793 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Betwixt uses BeanUtils's ConverterUtils to do type conversions. You=20 could always register your own special converter object to handle the=20 conversion of String -> Date. Though I would have throught this worked=20= out of the box as I thought java.util.Date was supported. Any chance you could create a little test case of a bean & some XML=20 that doesn't work correctly and we can add it to the JUnit test cases &=20= then fix the problem. BTW your bean is following the Java beans property naming rules? i.e.=20 one getter & one setter with the same type? On Wednesday, July 23, 2003, at 12:01 am, Ujjwala Kulkarni wrote: > Hi , > > =A0 > > I guess , when user calls method beanReader.parse(file) , the=20 > =A0=91update=92 of class = org.apache.commons.betwixt.expression.MethodUpdater=20 > =A0gets called. > > =A0 > > I observed that if the data types are java.util.Date , int the=20 > attributes are not getting converted to the required data type and=20 > hence I get the InvalidArgumentExcetion as the default attribute type=20= > passed is =91String=92 > > =A0 > > If the date is java.sql.Date then there is no problem but if it is=20 > java.util.Date type then I get this exception. One possible cause is=20= > that these data types do not have constructors accepting String as=20 > only argument. > > =A0 > > e.g java.util.Date =A0has deprecated new Date(String) constructor. > > And the Interger can not be converted to int like=A0 new int(String)=20= > =A0the code > > =A0 > > =93newValue =3D ConvertUtils.convert( (String) newValue, valueType = );=94=A0=20 > will always fail to convert to int or java.util.Date. > > =A0 > > Attaching the log file where I modified MethodUpdater and the log file=20= > I got. In theMethodUpdater , I have put some statements with =91UJ=92 = so=20 > you will see the log has those debug statements. > > =A0 > > Thanks > > Ujjwala > > --------------------------------------------------------------------- > To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org > For additional commands, e-mail: commons-dev-help@jakarta.apache.org James ------- http://radio.weblogs.com/0112098/ --Apple-Mail-43--954136793--