Announcement Announcement Module
Collapse
No announcement yet.
org.springframework.jdbc.object.StoredProcedure with SQL exception as Cursor is close Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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 31st, 2013, 12:28 AM.
Working...
X