You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ibatis.apache.org by "Leo Tu (JIRA)" <ib...@incubator.apache.org> on 2005/03/18 16:52:47 UTC

[jira] Created: (IBATIS-90) javabean setter Overloading cause cglib.beans.BulkBeanException

javabean setter Overloading cause cglib.beans.BulkBeanException
---------------------------------------------------------------

         Key: IBATIS-90
         URL: http://issues.apache.org/jira/browse/IBATIS-90
     Project: iBatis for Java
        Type: Bug
  Components: SQL Maps  
    Versions: 2.0.9    
 Environment: Winows XP
    Reporter: Leo Tu


Hi,
if my javabean overloading would cause problem:
"Caused by: net.sf.cglib.beans.BulkBeanException
        at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForPaginatedList(SqlMapDaoTemplate.java:274)"

i.e,
Bean:
public void setFrmSum(java.lang.Integer frmSum) {
  this.frmSum = frmSum;
}
public void setFrmSum(java.lang.String frmSumStr) {
  if (frmSumStr != null && frmSumStr.trim().length() > 0) {
     this.frmSum = new java.lang.Integer(frmSumStr.trim());
  }
}

Sqlmap.xml:
<resultMap id="firm-result" class="xxx.Firm">
   ....
   <result property="frmSum" column="FRM_SUM" jdbcType="INTEGER"/>
   ...
</resultMap>

<select id="xxx" parameterClass="xxx.FirmPk" resultMap="firm-result">
	select * from firm
</select>





-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-90) javabean setter Overloading cause cglib.beans.BulkBeanException

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-90?page=comments#action_61224 ]
     
Clinton Begin commented on IBATIS-90:
-------------------------------------


Overloading setters is a bad idea anyway and will likely screw up more than just CGLIB.

Name your methods more explicitly, your code will be more readable that way too.

Cheers,
clinton

> javabean setter Overloading cause cglib.beans.BulkBeanException
> ---------------------------------------------------------------
>
>          Key: IBATIS-90
>          URL: http://issues.apache.org/jira/browse/IBATIS-90
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: Winows XP
>     Reporter: Leo Tu

>
> Hi,
> if my javabean overloading would cause problem:
> "Caused by: net.sf.cglib.beans.BulkBeanException
>         at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForPaginatedList(SqlMapDaoTemplate.java:274)"
> i.e,
> Bean:
> public void setFrmSum(java.lang.Integer frmSum) {
>   this.frmSum = frmSum;
> }
> public void setFrmSum(java.lang.String frmSumStr) {
>   if (frmSumStr != null && frmSumStr.trim().length() > 0) {
>      this.frmSum = new java.lang.Integer(frmSumStr.trim());
>   }
> }
> Sqlmap.xml:
> <resultMap id="firm-result" class="xxx.Firm">
>    ....
>    <result property="frmSum" column="FRM_SUM" jdbcType="INTEGER"/>
>    ...
> </resultMap>
> <select id="xxx" parameterClass="xxx.FirmPk" resultMap="firm-result">
> 	select * from firm
> </select>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (IBATIS-90) javabean setter Overloading cause cglib.beans.BulkBeanException

Posted by "Leo Tu (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-90?page=comments#action_61254 ]
     
Leo Tu commented on IBATIS-90:
------------------------------

Thanks. Got it !

I solve this problem add:
javaType="java.lang.Integer" 

"Overloading" because I hope it can be work as Struts
ActionForm :-( 

> javabean setter Overloading cause cglib.beans.BulkBeanException
> ---------------------------------------------------------------
>
>          Key: IBATIS-90
>          URL: http://issues.apache.org/jira/browse/IBATIS-90
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: Winows XP
>     Reporter: Leo Tu
>     Assignee: Clinton Begin

>
> Hi,
> if my javabean overloading would cause problem:
> "Caused by: net.sf.cglib.beans.BulkBeanException
>         at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForPaginatedList(SqlMapDaoTemplate.java:274)"
> i.e,
> Bean:
> public void setFrmSum(java.lang.Integer frmSum) {
>   this.frmSum = frmSum;
> }
> public void setFrmSum(java.lang.String frmSumStr) {
>   if (frmSumStr != null && frmSumStr.trim().length() > 0) {
>      this.frmSum = new java.lang.Integer(frmSumStr.trim());
>   }
> }
> Sqlmap.xml:
> <resultMap id="firm-result" class="xxx.Firm">
>    ....
>    <result property="frmSum" column="FRM_SUM" jdbcType="INTEGER"/>
>    ...
> </resultMap>
> <select id="xxx" parameterClass="xxx.FirmPk" resultMap="firm-result">
> 	select * from firm
> </select>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (IBATIS-90) javabean setter Overloading cause cglib.beans.BulkBeanException

Posted by "Clinton Begin (JIRA)" <ib...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/IBATIS-90?page=history ]
     
Clinton Begin closed IBATIS-90:
-------------------------------

     Assign To: Clinton Begin
    Resolution: Won't Fix


This is not an iBATIS-only issue.

> javabean setter Overloading cause cglib.beans.BulkBeanException
> ---------------------------------------------------------------
>
>          Key: IBATIS-90
>          URL: http://issues.apache.org/jira/browse/IBATIS-90
>      Project: iBatis for Java
>         Type: Bug
>   Components: SQL Maps
>     Versions: 2.0.9
>  Environment: Winows XP
>     Reporter: Leo Tu
>     Assignee: Clinton Begin

>
> Hi,
> if my javabean overloading would cause problem:
> "Caused by: net.sf.cglib.beans.BulkBeanException
>         at com.ibatis.dao.client.template.SqlMapDaoTemplate.queryForPaginatedList(SqlMapDaoTemplate.java:274)"
> i.e,
> Bean:
> public void setFrmSum(java.lang.Integer frmSum) {
>   this.frmSum = frmSum;
> }
> public void setFrmSum(java.lang.String frmSumStr) {
>   if (frmSumStr != null && frmSumStr.trim().length() > 0) {
>      this.frmSum = new java.lang.Integer(frmSumStr.trim());
>   }
> }
> Sqlmap.xml:
> <resultMap id="firm-result" class="xxx.Firm">
>    ....
>    <result property="frmSum" column="FRM_SUM" jdbcType="INTEGER"/>
>    ...
> </resultMap>
> <select id="xxx" parameterClass="xxx.FirmPk" resultMap="firm-result">
> 	select * from firm
> </select>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira