Hi,

I have tried to search with numeric type but i encounter
java.lang.ClassCastException.

*Scenario:*
1. Quantity field in InvoiceItem entity has numeric type.
2. Query command:
mapCondition.put("quantity", "123");
delegator.find("InvoiceItem", EntityCondition.makeCondition(mapCondition),
null, null, null, null);
3. I found flow of code after debugging:

sqlP.setValue(handler, handler.getJavaClass().cast(fieldValue));  // row 783

public T cast(Object obj) {  // from row 2997
        if (obj != null && !isInstance(obj))
            throw new ClassCastException();  // The code cause CCE
        return (T) obj;
    }

Is there anyone encountered this issue?



-----
Rong Nguyen

Olbius JSC
Deliver highest business value
http://www.olbius.com/
--
View this message in context: 
http://ofbiz.135035.n4.nabble.com/How-to-find-numeric-type-tp4657235.html
Sent from the OFBiz - Dev mailing list archive at Nabble.com.

Reply via email to