commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From akiraleon123 <akira.leon...@gmail.com>
Subject Re: digester ignore data mismatch exception?
Date Tue, 20 Nov 2007 19:25:56 GMT

The only way i see is to change source code in beanutils(may be writing
custom converter or catching the conversionexception etc.,) and recompile
it. I 'd appreciate if you can let me know if there is any graceful way to
handle this requirement.

thanks.
akira

akiraleon123 wrote:
> 
> Hi All,
>  Any help is sincerely appreciated.
> 
> How can i instruct digester to ignore the data type mismatch exceptions
> being caused by beanutils and proceed further?
> So, from the previous xml file, though the first resource causes an
> exception, 
> 
> 
> org.apache.commons.beanutils.ConversionException: For input string: "fcd"
> 	at
> org.apache.commons.beanutils.converters.BigDecimalConverter.convert(BigDecimalConverter.java:162)
> 
> 
> 
> i want to get the second resource object.
> 
> 
> <country>
> <companies>
> <company name="dell">
> <resources>
> 
> <resource value="fcd"/> <!--data type mismatch-->
> 
> <resource value="33.44"/>
> 
> </resources>
> </company>
> </companies>
> </country>
> 
> 
> My class file:
> 
> class Resource{
> private BigDecimal value;
> //getters, setters
> }
> 
> 
> 
> thanks,
> akira.
> 
> 

-- 
View this message in context: http://www.nabble.com/digester-ignore-data-mismatch-exception--tf4839300.html#a13863883
Sent from the Commons - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@commons.apache.org
For additional commands, e-mail: user-help@commons.apache.org


Mime
View raw message