ibatis-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bret Gregory (JIRA)" <ibatis-...@incubator.apache.org>
Subject [jira] Commented: (IBATIS-220) Null Pointer in SqlExecutor.handleResults where ResultSet is null.
Date Mon, 28 Nov 2005 17:24:38 GMT
    [ http://issues.apache.org/jira/browse/IBATIS-220?page=comments#action_12358679 ] 

Bret Gregory commented on IBATIS-220:

I am not using custom type handlers.  
I attached the XML Map.  

>From what I can tell, it is okay for the JDBC Driver to be returning null in the execute
method and this scenario is not handled within the iBatis code and should be.  It was handled
previously because the code used executeQuery which always returns a result set even if it
is empty.  

> Null Pointer in SqlExecutor.handleResults where ResultSet is null.
> ------------------------------------------------------------------
>          Key: IBATIS-220
>          URL: http://issues.apache.org/jira/browse/IBATIS-220
>      Project: iBatis for Java
>         Type: Bug
>     Versions: 2.1.5, 2.1.6
>  Environment: Windows XP Pro
> MS SQL Server
>     Reporter: Bret Gregory
>  Attachments: CronJob.xml
> I recently ran into a problem while executing a stored procedure using an inline map
in iBatis 2.1.5_582.  I tested this in 2.1.6_592 to see if the problem was resolved and I
am still running into the issue.  I am not sure if this is specific to the JDBC implementation
for my SQL Server driver or not.  
> Caused by: java.lang.NullPointerException
>         at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:355)
>         at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQueryProcedure(SqlExecutor.java:291)
>         at com.ibatis.sqlmap.engine.mapping.statement.ProcedureStatement.sqlExecuteQuery(ProcedureStatement.java:34)
>         at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(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.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

View raw message