commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mike Zatko <mza...@boscovs.com>
Subject [Digester] Mapping with primatives
Date Thu, 12 Aug 2004 14:13:38 GMT
I have a problem where I need digester to map to primitive values. I 
have a bean that has properties with setters as such:

setDiscountTotal(double discountTotal);

Digester won't match to it and I can't find out what to do. Any suggestions?

> 171 [main] DEBUG org.apache.commons.digester.Digester  -   
> match='com.boscovs.translator.dto.sql.Order/discount-total'
> 171 [main] DEBUG org.apache.commons.digester.Digester  -   bodyText='0.0'
> 171 [main] DEBUG org.apache.commons.digester.Digester  -   Fire body() 
> for CallMethodRule[methodName=setDiscountTotal, paramCount=0, 
> paramTypes={java.lang.String}]
> 171 [main] DEBUG org.apache.commons.digester.Digester  -   Popping 
> body text ''
> 171 [main] DEBUG org.apache.commons.digester.Digester  -   Fire end() 
> for CallMethodRule[methodName=setDiscountTotal, paramCount=0, 
> paramTypes={java.lang.String}]
> 171 [main] DEBUG org.apache.commons.digester.Digester  - 
> [CallMethodRule]{com.boscovs.translator.dto.sql.Order/discount-total} 
> Call 
> com.boscovs.translator.dto.sql.Order.setDiscountTotal(0.0/java.lang.String)
> 171 [main] DEBUG org.apache.commons.beanutils.MethodUtils  - Matching 
> name=setDiscountTotal on class com.boscovs.translator.dto.sql.Order
> 171 [main] DEBUG org.apache.commons.beanutils.MethodUtils  - Found 
> matching name:
> 171 [main] DEBUG org.apache.commons.beanutils.MethodUtils  - public 
> void com.boscovs.translator.dto.sql.Order.setDiscountTotal(double)
> 171 [main] DEBUG org.apache.commons.beanutils.MethodUtils  - 
> Param=java.lang.String
> 171 [main] DEBUG org.apache.commons.beanutils.MethodUtils  - Method=double
> 171 [main] DEBUG org.apache.commons.beanutils.MethodUtils  - double is 
> not assignable from class java.lang.String
> 171 [main] DEBUG org.apache.commons.beanutils.MethodUtils  - No match 
> found.
> 171 [main] ERROR org.apache.commons.digester.Digester  - End event 
> threw exception
> java.lang.NoSuchMethodException: No such accessible method: 
> setDiscountTotal() on object: com.boscovs.translator.dto.sql.Order


-- 
Michael H. Zatko
Java Enterprise Developer
Boscov's Information Services
Work: 610-929-7317
Home: 610-376-1624
Page: 610-736-4460



Mime
View raw message