ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Satish Kumar <cs...@yahoo.com>
Subject Handle to ResultSet
Date Fri, 05 Jan 2007 19:42:48 GMT

I am a new user of iBATIS Ver 2.3.0. I have a requirement to get the handle to the ResultSet
from iBATIS for post-processing.

The ResultSet is from a Oracle Ref Cursor returned by a stored procedure. I followed the examples
mentioned on the iBATIS Wiki and mailing lists, but have not had success. 

I am using JDK 1.5, the latest version of Oracle 10g JDBC drivers.

Below is the SQLMap

<?xml version="1.0" encoding="UTF-8" ?>

    <parameterMap id="listErrorParameters" class="java.util.Map">
        <parameter property="serverId" jdbcType="NUMERIC" mode="IN"/>
        <parameter property="resultSet" javaType="java.sql.ResultSet" jdbcType="ORACLECURSOR"

    <procedure id="listError" parameterMap="listErrorParameters" >         
        {call listError(?,?)}

Sample Program:

    public static main(String[] args) {
        String resource;
        Reader reader;

        SqlMapClient sqlMap;
        resource = "sqlMap-config.xml";
        reader = Resources.getResourceAsReader (resource);
        sqlMap = SqlMapClientBuilder.buildSqlMapClient(reader);

        Map paramsMap = new HashMap();
        paramsMap.put("id", "1000");

        sqlMap.queryForObject("listError", paramsMap);

        System.out.println("resultSet: " + paramsMap.get("resultSet"));

        }catch(Exception aoExec)

In the above program paramsMap.get("resultSet") always returns null, and I am not sure why?

Any help would be greatly appreciated.


Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
View raw message