sql - Invalid column index during procedure execution -
below exception got after invoking stored procedure using spring jdbc template java.
org.springframework.jdbc.uncategorizedsqlexception: callablestatementcallback; uncategorized sqlexception sql [{call pkg_ibs_ac_change_api.p_update_account_currency(?, ?, ?, ?, ?, ?, ?, ?, ?)}]; sql state [null]; error code [17004]; invalid column type; nested exception java.sql.sqlexception: invalid column type @ caused by: java.sql.sqlexception: invalid column type @ oracle.jdbc.driver.databaseerror.throwsqlexception(databaseerror.java:112) org.springframework.jdbc.core.statementcreatorutils.setparametervalue(statementcreatorutils.java:127) @ org.springframework.jdbc.core.callablestatementcreatorfactory$callablestatementcreatorimpl.createcallablestatement(callablestatementcreatorfactory.java:212) @ org.springframework.jdbc.core.jdbctemplate.execute(jdb
so ran same code using spring debug mode , below few output logger.
debug:28-08-2013 17:55:57,503: callmetadataprovider - retrieving metadata pkg_ibs_ac_change_api/ppokerops/p_update_account_currency debug:28-08-2013 17:55:58,008: callmetadataprovider - retrieved metadata: in_account_name 1 12 varchar2 true debug:28-08-2013 17:55:58,011: callmetadataprovider - retrieved metadata: in_new_ac_type 1 12 varchar2 true debug:28-08-2013 17:55:58,015: callmetadataprovider - retrieved metadata: in_should_commit 1 1111 pl/sql boolean true debug:28-08-2013 17:55:58,019: callmetadataprovider - retrieved metadata: out_error_info 4 1111 ppokerops.type_bonus_error_info true debug:28-08-2013 17:55:58,022: callmetadataprovider - retrieved metadata: in_source 1 12 varchar2 true debug:28-08-2013 17:55:58,025: callmetadataprovider - retrieved metadata: in_event_txn_id 1 3 number true debug:28-08-2013 17:55:58,029: callmetadataprovider - retrieved metadata: in_source_type 1 12 varchar2 true debug:28-08-2013 17:55:58,032: callmetadataprovider - retrieved metadata: out_old_account_info 4 1111 ezecash.type_user_account_info true debug:28-08-2013 17:55:58,036: callmetadataprovider - retrieved metadata: out_new_account_info 4 1111 ezecash.type_user_account_info true debug:28-08-2013 17:55:58,040: datasourceutils - returning jdbc connection datasource debug:28-08-2013 17:55:58,045: callmetadatacontext - using declared parameter for: in_account_name .............. debug:28-08-2013 17:55:58,053: simplejdbccall - following parameters used call {call pkg_ibs_ac_change_api.p_update_account_currency(?, ?, ?, ?, ?, ?, ?, ?, ?)} with: {in_source=source, in_source_type=sourcetype, in_event_txn_id=340, in_account_name=name, in_new_ac_type=usd, in_should_commit=0} debug:28-08-2013 17:55:58,053: simplejdbccall - 1: in_account_name sql type 12 type name null org.springframework.jdbc.core.sqlparameter debug:28-08-2013 17:55:58,053: simplejdbccall - 2: in_new_ac_type sql type 12 type name null org.springframework.jdbc.core.sqlparameter debug:28-08-2013 17:55:58,053: simplejdbccall - 3: in_should_commit sql type 1111 type name null org.springframework.jdbc.core.sqlparameter debug:28-08-2013 17:55:58,054: simplejdbccall - 4: out_error_info sql type 1111 type name type_bonus_error_info org.springframework.jdbc.core.sqloutparameter debug:28-08-2013 17:55:58,054: simplejdbccall - 5: in_source sql type 12 type name null org.springframework.jdbc.core.sqlparameter debug:28-08-2013 17:55:58,054: simplejdbccall - 6: in_event_txn_id sql type 3 type name null org.springframework.jdbc.core.sqlparameter debug:28-08-2013 17:55:58,054: simplejdbccall - 7: in_source_type sql type 12 type name null org.springframework.jdbc.core.sqlparameter debug:28-08-2013 17:55:58,054: simplejdbccall - 8: out_old_account_info sql type 1111 type name ezecash.type_user_account_info org.springframework.jdbc.core.sqloutparameter debug:28-08-2013 17:55:58,054: simplejdbccall - 9: out_new_account_info sql type 1111 type name ezecash.type_user_account_info org.springframework.jdbc.core.sqloutparameter
earlier type values 1111,12,3 etc different metadata , simplejdbc call. found values , made types same. still there problem in setting values. below how set values
parameters.put("in_account_name", "name"); parameters.put("in_new_ac_type", tocurrency); parameters.put("in_should_commit", new boolean(true));//i tried 0 , 1 parameters.put("in_source", "source"); parameters.put("in_event_txn_id", new bigdecimal(340.0));//tried 340.00 parameters.put("in_source_type", "sourcetype");//these values varchar
so can me find out went wrong , why getting invalid column index exception?
Comments
Post a Comment