ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From BalaKishore Pamarti <bpama...@yahoo.com>
Subject Re: Exhausted resultset exception when use Oracle REF cursor type as output parameter from Stored Procedure
Date Fri, 16 May 2008 16:20:56 GMT
At the first glance I noticed these --
   
  You dont have to sepicify resultMap for all the IN parameters in parameterMap element.
   
  Your listed parameters in the parameterMap element are 9 and your ?'s in the procedure call
are 14. think this should be 8

  There is not match for ur parameters specified in the stored procedure to those in parameterMap
element.
   
  post the right code.

Eugene Dvorkin <Eugene.Dvorkin@artstor.org> wrote:
  Hi,
We developed application with Spring, Hibernate and Ibatis. 
We use Oracle Application Server and configured database Connection Pool
provided by Application Server.
Then we start stress test our application and discovered problem that
appears only under load and only in a call to 
Stored Procedures than returns REF Cursor. 
Caused by: 
com.ibatis.common.jdbc.exception.NestedSQLException: 
--- The error occurred in org/artstor/pojo/CategoryThumbnail.xml. 
--- The error occurred while applying a result map. 
--- Check the CategoryThumbnail.result. 
--- Check the result mapping for the 'thumbnailImgUrl' property. 
--- Cause: java.sql.SQLException: Exhausted Resultset
at
com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQuery
WithCallback(GeneralStatement.java:185)

when we use plain select statement, it works fine. The way we call
stored procedures is:



jdbcType="ORACLECURSOR" mode="OUT" resultMap="searchResult" />

javaType="java.lang.String" mode="IN" resultMap="searchResult"/>

mode="IN" resultMap="searchResult"/>

javaType="java.lang.String" mode="IN" resultMap="searchResult"/>

mode="IN" resultMap="searchResult"/>

javaType="long" mode="IN" resultMap="searchResult"/>

javaType="int" mode="IN" resultMap="searchResult"/>

javaType="int" mode="IN" resultMap="searchResult"/>

javaType="int" mode="IN" resultMap="searchResult"/> 






{?=call pkg_object_adv_search_new.do_search_v3
(?,?,?,?,?,?,?,?,?,?,?,?,?,?)}



In java :
HashMap parameters = new HashMap();
SqlMapClientTemplate client = getSqlMapClientTemplate();
.
.

client.queryForList("searchAllCollections ",
parameters);
result = (List) parameters.get("o");

Stored Procedure declaration:
FUNCTION search_collections (
keyword_words_in IN VARCHAR2,
obj_type_id_in IN NUMBER,
order_by_in IN VARCHAR2 DEFAULT ' sco1 desc, sco2 desc',
outlength_in IN NUMBER DEFAULT 501,
collection_ids_in IN VARCHAR2,
thumbnail_only_in IN BOOLEAN
)
RETURN pkg_object_search_cursor.return_cur;

Where return type is
TYPE object_cur IS REF CURSOR

When we accessing result from stored procedure, we got problem.
Please help
Sincerely,
eugene




"Peace is found not in what surrounds us, but in what we hold within."


       
Mime
View raw message