Announcement Announcement Module
Collapse
No announcement yet.
Stored procedure call Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Stored procedure call

    Hi everyone,

    I'm pretty new to the springframework. I need some help to make a call to a stored procedure that uses an array of structures. I have read several of your threads, but specially one i liked the most and tooked as an official guide. but so far i get an UncategorizedSQLException that reads:

    09:06:39,390 ERROR [STDERR] javax.ejb.EJBTransactionRolledbackException: org.springframework.jdbc.UncategorizedSQLException : CallableStatementCallback; uncategorized SQLException f
    or SQL [{call pkg_rkp_process_policy.Pro_ProcessRiskPolicy(?, ?, ?, ?, ?, ?, ?, ?, ?, ?)}]; SQL state [null]; error code [17132]; Invalid conversion requested; nested exception is
    my stored procedure class extends from org.springframework.jdbc.object.StoredProcedure. At the constructor receives the datasource, the parameters, the name for the stored procedure, an array of parmeters, and a bollean that specifies is a function or sp.

    the parameters are then looped and declared with org.springframework.jdbc.object.StoredProcedure.de clareParameter

    when the params are built, both, input and output params, go like this
    Code:
    SqlParameter("param_name", Types.ARRAY, "oracle_type_name")
    when the calls is made i use a class that represents the oracle type structure that implements SQLData. The String getSQLTypeName() method returns "oracle_type_name". Then read and write SQL methods are the same as in the official guide (he he) mentioned above.

    Any ideas to help are mostly welcome.

  • #2
    I have changed the parameters settings to

    Code:
    SqlParameter("param_name", OracleTypes.ARRAY, "oracle_type_name")
    SqlParameter("param_name", OracleTypes.ARRAY, "oracle_type_name")
    Is there anybody who's succed with this method, or mnaybe I should rather give a try to the JodbcTemplate class

    Comment

    Working...
    X