This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Internal Error:Invalid index for data access Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Internal Error:Invalid index for data access" Watch "Internal Error:Invalid index for data access" New topic
Author

Internal Error:Invalid index for data access

raju parepally parepally
Greenhorn

Joined: Mar 01, 2006
Posts: 14
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

Joined: Aug 13, 2004
Posts: 1081

  • post your code, with the signature of your stored procedure.
  • post the StackTrace if any




  • Shailesh


    Gravitation cannot be held responsible for people falling in love ~ Albert Einstein
    arie narula
    Greenhorn

    Joined: Jul 21, 2006
    Posts: 1
    anyone got an answer to this problem

    Internal error: invalid index for data access

    calling a stored procedure from a JSP
    Jeanne Boyarsky
    internet detective
    Marshal

    Joined: May 26, 2003
    Posts: 30138
        
    150

    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.


    [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
    Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
    Sam Md
    Greenhorn

    Joined: Feb 11, 2010
    Posts: 3
    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

    Joined: Feb 11, 2010
    Posts: 3

    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

    Joined: Dec 20, 2006
    Posts: 2491
        
        8

    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


    OCUP UML fundamental and ITIL foundation
    youtube channel
    Sam Md
    Greenhorn

    Joined: Feb 11, 2010
    Posts: 3
    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,

     
    Don't get me started about those stupid light bulbs.
     
    subject: Internal Error:Invalid index for data access
     
    Similar Threads
    Captcha problem
    array comparison
    How to use array of beans in jsp
    Error:Invalid class file format for HttpServlet class in servlet.jar
    SQL error:Invalid identifier