Win a copy of Learn Spring Security (video course) this week in the Spring forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Internal Error:Invalid index for data access

 
raju parepally parepally
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear Coleages,
i am getting this error when i am getting the data from oracle.Here i am using jsp to call oracle procedure this exception is coming randomly
java.sql.SQLException:InternalError:Internal Error:Invalid index for data access


Thanx in advance
nagaraju
 
Shailesh Chandra
Ranch Hand
Posts: 1082
Java Oracle Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
  • post your code, with the signature of your stored procedure.
  • post the StackTrace if any




  • Shailesh
     
    arie narula
    Greenhorn
    Posts: 1
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    anyone got an answer to this problem

    Internal error: invalid index for data access

    calling a stored procedure from a JSP
     
    Jeanne Boyarsky
    author & internet detective
    Marshal
    Posts: 34071
    331
    Eclipse IDE Java VI Editor
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Are you setting all the parameters? Also check the getXXX() method indices are valid.

    If you'd like more help, please post some code here.
     
    Sam Md
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Mohammed Sameer wrote: Iam getting this Exception while calling a stored procedure using Callable statement in core java. Any help is appreciated. Its Production issue. Urgent please
    Here is the piece of Code:
    callableStmt.setString(1,sRetMsg);
    callableFeedStmt.registerOutParameter(2,java.sql.Types.VARCHAR);
    callableFeedStmt.execute();
    con.commit();
    sRetVal = callableFeedStmt.getString(2); // At this line iam getting exception: Internal error: Invalid index for data access
    Exception Trace is as follows:
    Internal error: Invalid index for data access
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    oracle.jdbc.dbaccess.DBData.checkItemNumber(DBData.java:398)
    oracle.jdbc.dbaccess.DBData.getItem(DBData.java:347)
    oracle.jdbc.dbaccess.DBDataSetImpl.getCharsItem(DBDataSetImpl.java:1488)
    oracle.jdbc.driver.OracleStatement.getCharsInternal(OracleStatement.java:3355)
    oracle.jdbc.driver.OracleStatement.getStringValue(OracleStatement.java:3556)

     
    Sam Md
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator

    Mohammed Sameer wrote: Iam getting this Exception while calling a stored procedure using Callable statement in core java. Any help is appreciated. Its Production issue. Urgent please
    Here is the piece of Code:
    callableStmt.setString(1,sRetMsg);
    callableFeedStmt.registerOutParameter(2,java.sql.Types.VARCHAR);
    callableFeedStmt.execute();
    con.commit();
    sRetVal = callableFeedStmt.getString(2); // At this line iam getting exception: Internal error: Invalid index for data access
    Exception Trace is as follows:
    Internal error: Invalid index for data access
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
    oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:269)
    oracle.jdbc.dbaccess.DBData.checkItemNumber(DBData.java:398)
    oracle.jdbc.dbaccess.DBData.getItem(DBData.java:347)
    oracle.jdbc.dbaccess.DBDataSetImpl.getCharsItem(DBDataSetImpl.java:1488)
    oracle.jdbc.driver.OracleStatement.getCharsInternal(OracleStatement.java:3355)
    oracle.jdbc.driver.OracleStatement.getStringValue(OracleStatement.java:3556)

     
    Jan Cumps
    Bartender
    Posts: 2584
    11
    C++ Linux Netbeans IDE
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Hi Sameer,

    Its Production issue. Urgent please
    Sorry. that is a non-java related issue that we can't fix
    Can you please also post the part where you create callableStmt? We would like to see the sql string.

    Please use code tags around your code for readability. Use the "Code" button next to the Quote button.

    Regards, Jan

     
    Sam Md
    Greenhorn
    Posts: 3
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Jan Cumps wrote:Hi Jan, Please throw light on the below code and where iam calling the procedure
    Iam createingthe CallableStatement instance in ClassMain as follows:
    ClassMain.callableStmt=ClassMain.con.prepareCall("{ callXYZ(?,?)}"); (1-Input Parameter 2- OutputParameter(i.e. String))


    Quick suggestions will be appreciated.
    Regards,

     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic