ibatis-user-java mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bhaarat Sharma <bhaara...@gmail.com>
Subject Re: resultset access error
Date Thu, 28 May 2009 11:29:01 GMT
my stack trace is:
org.springframework.jdbc.InvalidResultSetAccessException: SqlMapClient
operation; invalid ResultSet access for SQL []; nested exception is
com.ibatis.common.jdbc.exception.NestedSQLException: --- The error occurred
in securityexam.xml. --- The error occurred while executing query procedure.
--- Check the { call pih.getExamQuestions (?) }. --- Check the output
parameters (register output parameters failed). --- Cause:
java.sql.SQLException: Invalid column index Caused by:
java.sql.SQLException: Invalid column index
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

My result Map is:

<!-- SP1 -->

    <resultMap id="getQuestionsOptions" class="examVo">
        <result property="question" column="question"/>
<!--parameter Map-->
    <parameterMap id="getExamQuestionsParm" class="map">
        <parameter property="userRole" jdbcType="String"
javaType="java.lang.String" mode="IN"/>
        <parameter property="questions_options_results"
jdbcType="ORACLECURSOR" javaType="java.sql.ResultSet"  mode="OUT"
<!--procedure -->
    <procedure id="getExamQuestions" parameterMap="getExamQuestionsParm">
        { call pih.getExamQuestions (?) }
<!--End SP1-->

and this is part of my SP:

            OPEN questions_options_results for select
                                             QSTN_ID as "questionId",
                                             QSTN_TEXT as "question",
                                             RSPNS_CHCE_1_TEXT as "option1"
                                             RSPNS_CHCE_2_TEXT as "option2",
                                             RSPNS_CHCE_3_TEXT as "option3",
                                             RSPNS_CHCE_4_TEXT as "option4"
                          from SECURITY_TRAINING_QUESTION
                      where rownum < 11 order by QSTN_ID;

Thanks in advance

On Thu, May 28, 2009 at 2:25 AM, Sundar Sankar <fatboysuns@gmail.com> wrote:

> My guess is that you are trying to access a column index (rs.get(index))
> for something that doesn't exist. If you could send out what exactly you are
> doing and more pieces of your stacktrace, including an ORA #, that should
> help more.
> -Sundar
> On Wed, May 27, 2009 at 9:29 PM, Bhaarat Sharma <bhaarat.s@gmail.com>wrote:
>> I am getting the following error: SqlMapClient operation; invalid
>> ResultSet access for SQL []; nested exceptionCaused by:
>> java.sql.SQLException: Invalid column index
>> org.apache.struts2.dispatcher.Dispatcher.serviceAction(Dispatcher.java:518)
>> All the resultmappings and parameter mappings are fine.
>> can the 'invalid resultset access for sql' mean that the user id i am
>> using to connect to the DB doesnt have rights to execute this stored
>> procedure?
>> I am doing this in oracle..

View raw message