1. Get rid of all advertisements and get unlimited access to documents by upgrading to Premium Membership. Upgrade to Premium Now and also get a Premium Badge!

java.sql.SQLException: ORA-24338: statement handle not executed

Discussion in 'SQL PL/SQL' started by brpt, Apr 7, 2011.

  1. brpt

    brpt Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    hi all fellow members,
    This is Rajendra.
    I have a problem with Stored Procedure which returns Ref Cursor. I am facing this problem since last few days. I did some many things. But no use.
    I have stored procedure in my local Database as well as in remote Database (same is created at both places to verify). When I access the Stored Procedure from local Database, I have no problems and able to read the data from cursor.
    When I call the Stored Procedure of remote Database, I am getting Exception. I am getting Exception when I try to read the data from cursor. The exception stack trace, I am getting is as follow :

    java.sql.SQLException: ORA-24338: statement handle not executed
    at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:331)
    at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:288)
    at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:745)
    at oracle.jdbc.driver.T4CStatement.doOall8(T4CStatement.java:207)
    at oracle.jdbc.driver.T4CStatement.fetch(T4CStatement.java:1029)
    at oracle.jdbc.driver.OracleResultSetImpl.close_or_fetch_from_next(OracleResultSetImpl.java:291)
    at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:213)

    In the above trace, I removed the most of the lines which starts from my app specific method calls.

    Thanks in advance for your suggessions. Waiting for your valuable suggessions.

    Best Regards,
    Rajendra
     
  2. debasisdas

    debasisdas Active Member

    Messages:
    46
    Likes Received:
    3
    Trophy Points:
    90
    Location:
    Bangalore, India
    From the log that you have posted here , it is not possible to guess the exact cause of error.

    Please call the stored procedure at database level and check if it executes without any error.
     
  3. brpt

    brpt Active Member

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    55
    Hi,
    Thanks for your reply.
    It is a stored procedure on remote database. I have other stored procedures which has Number and Varchar type OUT parameters. I am able to get result from these data types. But the other stored procedure which has ref cursor OUT parameter, I am facing this problem.
    The stored procedure has no issues and I want to get clarified one thing, i.e., whether we can call stored procedure which has ref cursor type OUT parameter and get data from it or not.
    If you have any details on this front, please let me know.
    Best Regards,
    Rajendra