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
org.springframework.jdbc.support.SQLErrorCodeSQLExceptionTranslator.translate(SQLErrorCodeSQLExceptionTranslator.java:234)
org.springframework.orm.ibatis.SqlMapClientTemplate.execute(SqlMapClientTemplate.java:196)
org.springframework.orm.ibatis.SqlMapClientTemplate.executeWithListResult(SqlMapClientTemplate.java:219)
org.springframework.orm.ibatis.SqlMapClientTemplate.queryForList(SqlMapClientTemplate.java:266)
gov.hud.pih.eiv.data.dao.dataaccess.SecurityExamIbatisDAO.getSecurityQuestions(SecurityExamIbatisDAO.java:59)
gov.hud.pih.eiv.web.authentication.selectUserActionStruts2.prepareQuestions(selectUserActionStruts2.java:158)
gov.hud.pih.eiv.web.authentication.selectUserActionStruts2.doSubClassLogic(selectUserActionStruts2.java:148)
gov.hud.pih.eiv.web.authentication.oathParentAction.execute(oathParentAction.java:61)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:585)

My result Map is:

<!-- SP1 -->
<!--resultMap-->

    <resultMap id="getQuestionsOptions" class="examVo">
        <result property="question" column="question"/>
    </resultMap>
<!--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"
resultMap="getQuestionsOptions"/>
    </parameterMap>
<!--procedure -->
    <procedure id="getExamQuestions" parameterMap="getExamQuestionsParm">
        { call pih.getExamQuestions (?) }
    </procedure>
<!--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..
>>
>>
>>
>

Mime
View raw message