You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user-java@ibatis.apache.org by n sravanthi <ne...@gmail.com> on 2008/03/17 11:10:32 UTC

Problem with setting the bean variable

Hi,
I am getting the following exception for the select query.
 com.ibatis.common.beans.ProbeException: Could not set property
'fltSalary' for EmployeeBean

The data type for the field in database is number(16,6) and I declared
it as float in the bean.
The select query for this is as follow:
<resultMap id="get-details" class="EmployeeBean">
<result property="strName" column="name" />
<result property="fltSalary" column="salary" />
</resultMap>

<select id="getSalary" resultMap="get-details" parameterClass="EmployeeBean">
select name,salary
from Emp1
where empid = #intEmpId#
and dept = #strDept#
</select>

The values that salary field is holding are within the float range.Can
anyone please tell me why this exception is coming.

Re: Problem with setting the bean variable

Posted by kiran vuppla <ki...@yahoo.com>.
Try to change the 'fltSalary' type to 'java.math.BigDecimal' from float and see if it works.

n sravanthi <ne...@gmail.com> wrote: Hi,
I am getting the following exception for the select query.
 com.ibatis.common.beans.ProbeException: Could not set property
'fltSalary' for EmployeeBean

The data type for the field in database is number(16,6) and I declared
it as float in the bean.
The select query for this is as follow:







The values that salary field is holding are within the float range.Can
anyone please tell me why this exception is coming.


       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.