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 Clinton Begin <cl...@gmail.com> on 2010/01/05 18:15:43 UTC

Re: is there any chance the https://issues.apache.org/jira/browse/IBATIS-717 will be implemented?

Can you try it locally first?  Just change the DTD to allow it.  I think it
works, as I believe it's all the same builder code.

You'll have to change the DTD URL and PUBLIC/SYSTEM to override it locally.

Clinton

On Tue, Jan 5, 2010 at 9:31 AM, OBender <os...@hotmail.com> wrote:

>  It’s a feature not a bug but pretty important one I think.
>

Re: is there any chance the https://issues.apache.org/jira/browse/IBATIS-717 will be implemented?

Posted by Clinton Begin <cl...@gmail.com>.
Darn.  It might be a bigger change then.  I'm not sure I'll have time to
look at it any time soon (maybe by end of Jan) ... if you're adventurous,
take a shot at it.  :-)

Clinton

On Tue, Jan 5, 2010 at 11:32 AM, OBender <os...@hotmail.com> wrote:

>  Unfortunately it doesn’t work. Code fails with the following:
>
> -----
>
> Caused by: java.lang.NullPointerException
>
>                 at
> org.apache.ibatis.executor.resultset.FastResultSetHandler.createParameterizedResultObject(FastResultSetHandler.java:295)
>
>                 at
> org.apache.ibatis.executor.resultset.FastResultSetHandler.createResultObject(FastResultSetHandler.java:281)
>
>                 at
> org.apache.ibatis.executor.resultset.FastResultSetHandler.createResultObject(FastResultSetHandler.java:268)
>
>                 at
> org.apache.ibatis.executor.resultset.NestedResultSetHandler.getRowValue(NestedResultSetHandler.java:97)
>
>                 at
> org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleRowValues(NestedResultSetHandler.java:75)
>
>                 at
> org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(FastResultSetHandler.java:107)
>
>                 at
> org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleResultSets(NestedResultSetHandler.java:56)
>
>                 at
> org.apache.ibatis.executor.statement.PreparedStatementHandler.query(PreparedStatementHandler.java:40)
>
>                 at
> org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:55)
>
>                 at
> org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)
>
>                 at
> org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:86)
>
>                 at
> org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:67)
>
>                 at
> org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:58)
>
> -----
>
>
>
> This is because it tries to get a typeHandler
>
>
>
> final TypeHandler typeHandler = constructorMapping.getTypeHandler();
>
> ^^^^^^^^^^^^^^^^^^^^^^^^ - null
>
> final String column = constructorMapping.getColumn();
>
> final Object value = typeHandler.getResult(rs, column);
>
>
>
>  which is null for mapping like:
>
>
>
> <arg javaType="TypeX" resultMap="TypeXResult"/>
>
>
>
> I’m not familiar (yet) with the way nested result maps are handled in other
> parts of the code but it seems that some info gets set correctly in to the
> constructor mapping, for example the nestedresultMapId is set correctly.
>
>
>
>
>
> *From:* Clinton Begin [mailto:clinton.begin@gmail.com]
> *Sent:* Tuesday, January 05, 2010 12:16 PM
> *To:* user-java@ibatis.apache.org
> *Subject:* Re: is there any chance the
> https://issues.apache.org/jira/browse/IBATIS-717 will be implemented?
>
>
>
> Can you try it locally first?  Just change the DTD to allow it.  I think it
> works, as I believe it's all the same builder code.
>
> You'll have to change the DTD URL and PUBLIC/SYSTEM to override it locally.
>
> Clinton
>
> On Tue, Jan 5, 2010 at 9:31 AM, OBender <os...@hotmail.com> wrote:
>
> It’s a feature not a bug but pretty important one I think.
>
>
>

RE: is there any chance the https://issues.apache.org/jira/browse/IBATIS-717 will be implemented?

Posted by OBender <os...@hotmail.com>.
Unfortunately it doesn't work. Code fails with the following:

-----

Caused by: java.lang.NullPointerException

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.createParameterize
dResultObject(FastResultSetHandler.java:295)

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.createResultObject
(FastResultSetHandler.java:281)

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.createResultObject
(FastResultSetHandler.java:268)

                at
org.apache.ibatis.executor.resultset.NestedResultSetHandler.getRowValue(Nest
edResultSetHandler.java:97)

                at
org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleRowValues(
NestedResultSetHandler.java:75)

                at
org.apache.ibatis.executor.resultset.FastResultSetHandler.handleResultSet(Fa
stResultSetHandler.java:107)

                at
org.apache.ibatis.executor.resultset.NestedResultSetHandler.handleResultSets
(NestedResultSetHandler.java:56)

                at
org.apache.ibatis.executor.statement.PreparedStatementHandler.query(Prepared
StatementHandler.java:40)

                at
org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingSt
atementHandler.java:55)

                at
org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:41)

                at
org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:86)

                at
org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:67)

                at
org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSe
ssion.java:58)

-----

 

This is because it tries to get a typeHandler

 

final TypeHandler typeHandler = constructorMapping.getTypeHandler();

^^^^^^^^^^^^^^^^^^^^^^^^ - null

final String column = constructorMapping.getColumn();

final Object value = typeHandler.getResult(rs, column);

 

 which is null for mapping like:

 

<arg javaType="TypeX" resultMap="TypeXResult"/>

 

I'm not familiar (yet) with the way nested result maps are handled in other
parts of the code but it seems that some info gets set correctly in to the
constructor mapping, for example the nestedresultMapId is set correctly.

 

 

From: Clinton Begin [mailto:clinton.begin@gmail.com] 
Sent: Tuesday, January 05, 2010 12:16 PM
To: user-java@ibatis.apache.org
Subject: Re: is there any chance the
https://issues.apache.org/jira/browse/IBATIS-717 will be implemented?

 

Can you try it locally first?  Just change the DTD to allow it.  I think it
works, as I believe it's all the same builder code.  

You'll have to change the DTD URL and PUBLIC/SYSTEM to override it locally.

Clinton

On Tue, Jan 5, 2010 at 9:31 AM, OBender <os...@hotmail.com> wrote:

It's a feature not a bug but pretty important one I think.