Results 1 to 1 of 1

Thread: org.springframework.jdbc.object.StoredProcedure with SQL exception as Cursor is close

Hybrid View

  1. #1
    Join Date
    Jan 2013
    Posts
    1

    Default org.springframework.jdbc.object.StoredProcedure with SQL exception as Cursor is close

    [B]Hi,

    I am using StroedPrcedure api to call an Oracle Stored procedure. There are two out param one is String type "status" and other is a REFCURSOR.
    When there is any Exception in user input I am not getting the Status output param and the execute method throws SQL exception.

    So I need to know how can I configure my code to get the output "status" param when there is some exception for the REFCURSOR.


    I guess I need something similar to custom handler in JDBC Template's "CallableStatementCallback & CallableStatementCreator"


    Direct call from a java test class for same input is working fine as I am getting null for the REFCURSOR and proper status message.


    Errors :

    org.springframework.jdbc.UncategorizedSQLException : CallableStatementCallback; uncategorized SQLException for SQL [{call Package.GET_SPDETAILS(?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; SQL state [null]; error code [0]; Cursor is closed.; nested exception is java.sql.SQLException: Cursor is closed.

    Thanks in Advance.
    Last edited by manoj_das; Jan 30th, 2013 at 11:28 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •