Skip to content

Null Pointer Exception with multiple result sets #132

@official-sounding

Description

@official-sounding

When running a stored procedure that returns more than one result set, we get the following Null Pointer Exception on mybatis 3.2.4

Caused by: java.lang.NullPointerException
    at org.apache.ibatis.executor.resultset.DefaultResultSetHandler.handleResultSets(DefaultResultSetHandler.java:159)
    at org.apache.ibatis.executor.statement.CallableStatementHandler.query(CallableStatementHandler.java:64)
    at org.apache.ibatis.executor.statement.RoutingStatementHandler.query(RoutingStatementHandler.java:70)
    at org.apache.ibatis.executor.SimpleExecutor.doQuery(SimpleExecutor.java:57)
    at org.apache.ibatis.executor.BaseExecutor.queryFromDatabase(BaseExecutor.java:259)
    at org.apache.ibatis.executor.BaseExecutor.query(BaseExecutor.java:132)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:105)
    at org.apache.ibatis.executor.CachingExecutor.query(CachingExecutor.java:81)
    at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:104)
    ... 41 more

when running the same stored procedure in mybatis 3.2.2, we do not get this exception. The exception occurs whether or not there is a empty result set present.

the null item appears to be the resultSets string array on the mappedStatement object, which you can see here

our database is Sybase, and we're using jtds-1.2.4

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions