I was getting the following error:
ORA-00932: inconsistent datatypes: expected NUMBER got BINARY
on line:
<property name="customer" column="CustomerId" />
the fix for above error was to use many-to-many tag instead of plain <property>:
<many-to-one name="customer" column="CustomerId" />
Note that class is not required here – it’s computed from return type of getCustomer() getter by reflection.

This exception is not very helpful at all!
In my case I found that passing value==null into the Spring DAO method below produced the same exception.
public List findByProperty(String propertyName, Object value){
String queryString = “from biz.Payment as model where model.”
+ propertyName + “= ?”;
return (List)getHibernateTemplate().find(queryString, value);
}
Comment by wytten — 14/12/2010 @
Probably biz.Payment.propertyName field is a primitive type (int), not wrapper (java.lang.Integer). That’s why null is not allowed here. Indeed, the exception is very misleading.
Comment by dariusz.cieslak — 18/12/2010 @
hi dariusz btw im getting this error “expected Number got Binary” how do i solve this problem because im getting stuck in this case in few days
help me out please
thanks gb
Comment by leonardo — 02/11/2011 @