spring jdbc - error code [17041]; Missing IN or OUT parameter at index:: 1; nested exception is java.sql.SQLException: Missing IN or OUT parameter at index:: 1 -


procedure parameters:

procedure get_user_profile (     i_attuid in  ras_user.attuid%type,     i_data_group in data_group_tbl,     o_user_info_tbl out user_info_tbl,     o_service_tbl out service_tbl,     o_user_role_tbl out user_role_tbl,     o_permission_tbl out permission_tbl,     o_work_group_tbl out work_group_tbl,     o_business_domain_tbl out business_domain_tbl,     o_skill_tbl out skill_tbl,     retnum               out number ) 

java code:

jdbctemplate jdbctemplate = new jdbctemplate(datasource); jdbctemplate.setresultsmapcaseinsensitive(true);  string procedurename = "{call get_user_profile(?,?,?,?,?,?,?,?,?,?)}"; simplejdbccall simplejdbccall =      new simplejdbccall(jdbctemplate).withcatalogname("ras_user_profile_pkg").withprocedurename(procedurename).declareparameters(         new sqlparameter("i_attuid", types.varchar),         new sqlparameter("i_data_group", types.array),         new sqloutparameter("o_user_info_tbl", types.array),         new sqloutparameter("o_service_tbl", types.array),         new sqloutparameter("o_user_role_tbl", types.array),         new sqloutparameter("o_permission_tbl", types.array),         new sqloutparameter("o_work_group_tbl", types.array),         new sqloutparameter("o_business_domain_tbl", types.array),         new sqloutparameter("o_skill_tbl", types.array),         new sqloutparameter("retnum", types.numeric));  datagroup = new arraylist<string>();  map<string, object> hm = new hashmap<string, object>(); hm.put("i_attuid", attuid); hm.put("i_data_group", datagroup.toarray()); hm.put("o_user_info_tbl", types.array); hm.put("o_service_tbl", types.array); hm.put("o_user_role_tbl", types.array); hm.put("o_permission_tbl",types.array); hm.put("o_work_group_tbl", types.array); hm.put("o_business_domain_tbl", types.array); hm.put("o_skill_tbl", types.array); hm.put("retnum", types.numeric);  sqlparametersource in = new mapsqlparametersource().addvalues(hm);  map simplejdbccallresult = simplejdbccall.execute(in); 

please me here (i new 2 this), why getting error:

sql state [99999]; error code [17041]; missing in or out parameter @ index:: 1; nested exception java.sql.sqlexception: missing in or out parameter @ index:: 1

you should set procedure's name , not instruction call procedure:

string procedurename = "get_user_profile"; 

Comments

Popular posts from this blog

javascript - Chart.js (Radar Chart) different scaleLineColor for each scaleLine -

apache - Error with PHP mail(): Multiple or malformed newlines found in additional_header -

java - Android – MapFragment overlay button shadow, just like MyLocation button -