File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrong no or type of argument in line 1, column 7

 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have used 9 parameter in procedure , below is signature.

MNC.mplsuk_create_bulk_vc_pvc(in_request_type in varchar2,
in_acvp_ckt_name in varchar2,
in_port_type in varchar2,
in_port_no in varchar2,
in_chk_all_param in number,
in_create_bulk_vcpvc in t_create_bulk_vcpvc,
out_result_vc_pvc out t_result_vc_pvc,
out_status_code out number,
out_status_message out varchar2) as


String query = "{call mplsuk_create_bulk_vc_pvc(?,?,?,?,?,?,?,?,?)}";
cstmt = this.getConnection().prepareCall(query);
ArrayDescriptorDAO adDAO = new ArrayDescriptorDAOImpl(this
.getConnection());

ARRAY saveArrayBulkVcPVC = adDAO.getArrayDescriptor("DBSEC.T_CREATE_BULK_VCPVC",
listTo2DArrayBulkVcPvcDetails(bulkVcPvcDetailsList));
System.out.println("saveBulkVcPvcDetails after saveArrayBulkVcPVC ");
cstmt.setString(1, requestType);
cstmt.setString(2, AcVpCktName);
cstmt.setString(3, portType);
cstmt.setString(4, portNo);
cstmt.setInt(5, checkAll);
cstmt.setArray(6, saveArrayBulkVcPVC);

cstmt.registerOutParameter(7, OracleTypes.CURSOR);
cstmt.registerOutParameter(8, OracleTypes.INTEGER);
cstmt.registerOutParameter(9, OracleTypes.VARCHAR);
cstmt.execute();

while executing my code i am getting this error:
wrong no or type or argument , while i checked arguments are correct in type and no.

could any one help me where this code is wrong,

my 6th in parameter is table type and 7th parameter is also table type.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33684
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I recommend removing parameters from the stored proc and JDBC code to identify which one it is. And then reply asking why for that one.
 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey man,

i am 100 % correct, the problem is not like wrong no and type of arguments but its out parameter as table type which is wrong.

out parameter in database never be as table type, it should be only cursor, boolean,number or varchar..

we have changed in backend proc from table type out parameter to ref cursor and then problem resolved.
 
Sunny Bhandari
Ranch Hand
Posts: 448
Eclipse IDE Firefox Browser Tomcat Server
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prabhat, please use code tagsvin your first post..
 
Prabhat Ranjan
Ranch Hand
Posts: 397
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prabhat Ranjan wrote:Hi All,

I have used 9 parameter in procedure , below is signature.


while executing my code i am getting this error:
wrong no or type or argument , while i checked arguments are correct in type and no.

could any one help me where this code is wrong,

my 6th in parameter is table type and 7th parameter is also table type.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic