• Post Reply Bookmark Topic Watch Topic
  • New Topic

weblogic database controls + stored procedure with Array issue  RSS feed

Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have the following code in a weblogic custom control which calls the database control GetLoadProfileFrmDB.getLoadProfileData(params) which in turn calls the SP {call PKG_IWAVE_UI.PP_IWAVE_DATA_MAIN(?, ?)}. The SP takes an integer as input and gives an Array as output. But I keep getting the error when the SP executes:

.getLoadProfileData(); Failure=java.sql.SQLException:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'PP_IWAVE_DATA_MAIN'
ORA-06550: line 1, column 7:

SQLParameter[] params = new SQLParameter[8];
Object param0 = new Integer(someInt);
Object param2 = null;
params[0] = new SQLParameter(param0, Types.INTEGER, SQLParameter.IN);
params[2] = new SQLParameter(param2, Types.ARRAY, SQLParameter.OUT);
GetLoadProfileFrmDB.getLoadProfileData(params); // error here

The error seems to be related to the mapping related to the output Array.

Thx for help,
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!