java - Execution of stored procedure using spring's SimpleJdbcCall not giving output -
this dao class, has datasource connects database, , retursn following :
2017-03-28 09:49:42 debug datasourceutils:327 - returning jdbc connection datasource 2017-03-28 09:49:42 debug callmetadatacontext:380 - using declared parameter for: pricetolerance_csr 2017-03-28 09:49:42 debug simplejdbccall:313 - compiled stored procedure. call string [{call z_getpricetolerancerejects(?)}] 2017-03-28 09:49:42 debug simplejdbccall:289 - sqlcall procedure [z_getpricetolerancerejects] compiled 2017-03-28 09:49:42 debug simplejdbccall:395 - following parameters used call {call z_getpricetolerancerejects(?)} {} 2017-03-28 09:49:42 debug simplejdbccall:398 - 1: pricetolerance_csr, sql type -10, type name null, parameter class [org.springframework.jdbc.core.sqloutparameter] 2017-03-28 09:49:42 debug jdbctemplate:1062 - calling stored procedure [{call z_getpricetolerancerejects(?)}] 2017-03-28 09:49:42 debug datasourceutils:110 - fetching jdbc connection datasource 2017-03-28 09:49:43 debug jdbctemplate:1136 - callablestatement.execute() returned 'false' 2017-03-28 09:49:43 debug jdbctemplate:1137 - callablestatement.getupdatecount() returned -1 2017-03-28 09:49:43 debug datasourceutils:327 - returning jdbc connection datasource 2017-03-28 09:49:43 info generatereportdaoimpl:59 - [null]
the generatereportdaoimpl
@component public class generatereportdaoimpl { private static logger logger = logger.getlogger(generatereportdaoimpl.class); private datasource datasource; private jdbctemplate jdbctemplate = new jdbctemplate(); private simplejdbccall jdbccall; public jdbctemplate getjdbctemplate() { return jdbctemplate; } public void setjdbctemplate(jdbctemplate jdbctemplate) { this.jdbctemplate = jdbctemplate; } public datasource getdatasource() { return datasource; } @autowired public void setdatasource(datasource datasource) { this.jdbctemplate = new jdbctemplate(datasource); this.jdbccall = new simplejdbccall(datasource); } public string getreportemailfromdb(string lookupcode){ string sql = "select lookup_description ussco_lookup_table lookup_code = ?"; return jdbctemplate.queryforobject(sql, new object[]{lookupcode},string.class); } public arraylist<object> getrecordsfromdatabase(string procedurename) { logger.log(level.info,procedurename); map<string, object> out = jdbccall.withprocedurename(procedurename) .declareparameters(new sqloutparameter("pricetolerance_csr", oracletypes.cursor, new pricetolerancefailurerptrowmapper() )).execute(); logger.log(level.info,out.values()); return new arraylist<>(); } }
Comments
Post a Comment