Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- PROCEDURE do_stuff (
- i_userid IN NUMBER,
- inlist IN detail_list
- outlist OUT detail_list,
- i_debugmode IN NUMBER := 0)
- create or replace
- TYPE detail_list AS TABLE OF detail
- create or replace
- TYPE detail AS OBJECT (
- field1 NUMBER (9),
- field2 NUMBER (9),
- field3 NUMBER (9),
- field4 NUMBER (1)
- )
- //populate list<myObject> into list myList.
- SimpleJdbcCall call = new SimpleJdbcCall(jdbcTemplate).withProcedureName("do_stuff").withCatalogName("catalogname");
- final MapSqlParameterSource params = new MapSqlParameterSource();
- params.addValue("i_userid", userID);
- params.addValue("inlist", myList);
- params.addValue("i_debug_mode", 0);
- Map<String, Object> results = call.execute(params);
- LOGGER.debug("About to execute the query. I hope this works");
- List<myObject> myList = (List<myObject>)results.get("outlist");
- chargeDetailsList = myList;
- public class myObject {
- private long field1;
- private long field2;
- private long field3;
- private long field4;
- //getters and setters....
- }
- org.springframework.jdbc.UncategorizedSQLException: CallableStatementCallback;
- uncategorized SQLException for SQL [{call do_stuff(?, ?, ?, ?)}]; SQL state [99999]; error code [17004];
- Invalid column type; nested exception is java.sql.SQLException: Invalid column type
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement