[jira] Closed: (IBATIS-501) 2.3.1 throws exception for java bean specification violation (2.3.0 not)

2008-04-20 Thread Clinton Begin (JIRA)

 [ 
https://issues.apache.org/jira/browse/IBATIS-501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Clinton Begin closed IBATIS-501.


   Resolution: Won't Fix
Fix Version/s: 2.3.2
 Assignee: Clinton Begin

Added to the release notes

> 2.3.1 throws exception for java bean specification violation (2.3.0 not)
> 
>
> Key: IBATIS-501
> URL: https://issues.apache.org/jira/browse/IBATIS-501
> Project: iBatis for Java
>  Issue Type: Bug
>  Components: SQL Maps
>Affects Versions: 2.3.1
> Environment: ibatis-2.3.1.710
>Reporter: Kai Grabfelder
>Assignee: Clinton Begin
> Fix For: 2.3.2
>
>
> Assume the following class com.foo.bar.Bean with the following methods: 
> void setFoo(int) 
> void setFoo(String) 
> int getFoo()
> I'm using this bean in an implicit parameter map as a parameter to an select 
> statement that looks like this
>  resultClass="java.lang.Integer">
> select * from dual where 1 = #bean.foo#
> 
> with the bean being a property of the map. This statement is working with 
> iBATIS 2.3.0 but iBATIS 2.3.1 throws the following exception when executing 
> the select:
> Could not get property 'foo' from com.foo.bar.Bean.  Cause: 
> java.lang.RuntimeException: Illegal overloaded setter method with ambiguous 
> type for property foo in class class com.foo.bar.Bean.  This breaks the 
> JavaBeans specification and can cause unpredicatble results.
> This exception makes sense when it comes to actually using the setters but as 
> only the getters are used I think it should not be thrown. It is perfectly ok 
> for me, if you consider this as won't fix, but please at least mention the 
> change in the release notes because it breaks backward compatibility.
> See below for the relevant parts of the stacktrace
> Caused by: com.ibatis.common.beans.ProbeException: Could not get property 
> 'foo' from com.foo.bar.Bean.  Cause: java.lang.RuntimeException: Illegal 
> overloaded setter method with ambiguous type for property foo in class class 
> com.foo.bar.Bean.  This breaks the JavaBeans specification and can cause 
> unpredicatble results.
>   at 
> com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:336)
>   at 
> com.ibatis.common.beans.ComplexBeanProbe.getObject(ComplexBeanProbe.java:190)
>   at com.ibatis.common.beans.GenericProbe.getObject(GenericProbe.java:74)
>   at 
> com.ibatis.sqlmap.engine.exchange.ComplexDataExchange.getData(ComplexDataExchange.java:65)
>   at 
> com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap.getParameterObjectValues(ParameterMap.java:133)
>   at 
> com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:181)
>   ... 30 more
> Caused by: java.lang.RuntimeException: Illegal overloaded setter method with 
> ambiguous type for property contractYear in class class com.foo.bar.Bean.  
> This breaks the JavaBeans specification and can cause unpredicatble results.
>   at 
> com.ibatis.common.beans.ClassInfo.resolveSetterConflicts(ClassInfo.java:163)
>   at com.ibatis.common.beans.ClassInfo.addSetMethods(ClassInfo.java:141)
>   at com.ibatis.common.beans.ClassInfo.(ClassInfo.java:76)
>   at com.ibatis.common.beans.ClassInfo.getInstance(ClassInfo.java:509)
>   at 
> com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:315)
>   ... 35 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.



Re: 2.3.1 throws exception for java bean specification violation (2.3.0 not)

2008-04-20 Thread Clinton Begin
I actually forgot to do the release notes for 2.3.1.  There are a couple of
minor points to fix with 2.3.1, including updating the release notes.  I'll
probably release 2.3.2 this weekend, which will tie up these loose ends.

Cheers,
Clinton

On Sun, Apr 20, 2008 at 5:38 AM, Kai Grabfelder <[EMAIL PROTECTED]> wrote:

> Hi there,
>
> I just wanted to quickly point you to
> https://issues.apache.org/jira/browse/IBATIS-501, requesting feedback.
>
> It is perfectly ok for me if it stays like this (ibatis 2.3.1 will throw
> an exception for setter related bean
> specification violations although only getters are used). I just wanted to
> ask if this could be mentioned in
> the release notes for 2.3.1
>
> Best Regards
>
> Kai Grabfelder
>


2.3.1 throws exception for java bean specification violation (2.3.0 not)

2008-04-20 Thread Kai Grabfelder

Hi there,

I just wanted to quickly point you to 
https://issues.apache.org/jira/browse/IBATIS-501, requesting feedback.

It is perfectly ok for me if it stays like this (ibatis 2.3.1 will throw an 
exception for setter related bean
specification violations although only getters are used). I just wanted to ask 
if this could be mentioned in
the release notes for 2.3.1

Best Regards

Kai Grabfelder


[jira] Created: (IBATIS-501) 2.3.1 throws exception for java bean specification violation (2.3.0 not)

2008-04-15 Thread Kai Grabfelder (JIRA)
2.3.1 throws exception for java bean specification violation (2.3.0 not)


 Key: IBATIS-501
 URL: https://issues.apache.org/jira/browse/IBATIS-501
 Project: iBatis for Java
  Issue Type: Bug
  Components: SQL Maps
Affects Versions: 2.3.1
 Environment: ibatis-2.3.1.710
Reporter: Kai Grabfelder


Assume the following class com.foo.bar.Bean with the following methods: 

void setFoo(int) 
void setFoo(String) 
int getFoo()

I'm using this bean in an implicit parameter map as a parameter to an select 
statement that looks like this


select * from dual where 1 = #bean.foo#


with the bean being a property of the map. This statement is working with 
iBATIS 2.3.0 but iBATIS 2.3.1 throws the following exception when executing the 
select:

Could not get property 'foo' from com.foo.bar.Bean.  Cause: 
java.lang.RuntimeException: Illegal overloaded setter method with ambiguous 
type for property foo in class class com.foo.bar.Bean.  This breaks the 
JavaBeans specification and can cause unpredicatble results.

This exception makes sense when it comes to actually using the setters but as 
only the getters are used I think it should not be thrown. It is perfectly ok 
for me, if you consider this as won't fix, but please at least mention the 
change in the release notes because it breaks backward compatibility.

See below for the relevant parts of the stacktrace

Caused by: com.ibatis.common.beans.ProbeException: Could not get property 'foo' 
from com.foo.bar.Bean.  Cause: java.lang.RuntimeException: Illegal overloaded 
setter method with ambiguous type for property foo in class class 
com.foo.bar.Bean.  This breaks the JavaBeans specification and can cause 
unpredicatble results.
at 
com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:336)
at 
com.ibatis.common.beans.ComplexBeanProbe.getObject(ComplexBeanProbe.java:190)
at com.ibatis.common.beans.GenericProbe.getObject(GenericProbe.java:74)
at 
com.ibatis.sqlmap.engine.exchange.ComplexDataExchange.getData(ComplexDataExchange.java:65)
at 
com.ibatis.sqlmap.engine.mapping.parameter.ParameterMap.getParameterObjectValues(ParameterMap.java:133)
at 
com.ibatis.sqlmap.engine.mapping.statement.MappedStatement.executeQueryWithCallback(MappedStatement.java:181)
... 30 more
Caused by: java.lang.RuntimeException: Illegal overloaded setter method with 
ambiguous type for property contractYear in class class com.foo.bar.Bean.  This 
breaks the JavaBeans specification and can cause unpredicatble results.
at 
com.ibatis.common.beans.ClassInfo.resolveSetterConflicts(ClassInfo.java:163)
at com.ibatis.common.beans.ClassInfo.addSetMethods(ClassInfo.java:141)
at com.ibatis.common.beans.ClassInfo.(ClassInfo.java:76)
at com.ibatis.common.beans.ClassInfo.getInstance(ClassInfo.java:509)
at 
com.ibatis.common.beans.ComplexBeanProbe.getProperty(ComplexBeanProbe.java:315)
... 35 more

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.