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 Bret Gregory <br...@reged.com> on 2005/11/03 22:17:10 UTC

Null Pointer in iBatis 2.1.5_582

I recently ran into a problem while executing a stored procedure using
an inline map in iBatis 2.1.5_582.

Caused by: java.lang.NullPointerException
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor
.java:355)
	at
com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQueryProcedure(Sql
Executor.java:291)
	at
com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement.sqlExecute
Query(ProcedureStatement.java:34)
	at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
WithCallback(GeneralStatement.java:173)

The problem looks to be caused by the callable statement not returning a
result set in the executeQueryProcedure method.  The rs variable is set
to null and passed into the handleResults() method.  This method
attempts to get the Type, and the Null Pointer is thrown.  

This looks like a bug and this code executes normally in iBatis 2.0.9 so
I thought I would write a note here and see if anyone else ran into
this.  

Thanks.
-Bret