MySQL Forums
Forum List  »  Docs

Internal error when parsing callable statement metadata (missing parameter type))
Posted by: swarupa paruchuri
Date: May 12, 2011 07:02AM

I get this error when executing a stored proc .
Here is the declaration of the procedure.
`SP_GetStatusReports`(IN phNum varchar(200),IN sel int,IN depid int,IN date1 varchar(30),IN sub varchar(40),IN mes varchar(200),IN file1 varchar(150),IN sel1 int )

I invoke the proc like this:

String stored_procedure = " { call SP_GetStatusReports(?,?,?,?,?,?,?,?)} ";

callableStatement = connection.prepareCall(stored_procedure);
//System.out.println(selection+"\n"+s+"\n");
callableStatement.setString(1, phno);
callableStatement.setInt(2, selection);
callableStatement.setInt(3, deptId);
callableStatement.setString(4, from_date);
callableStatement.setString(5, sub);
callableStatement.setString(6, mes);
callableStatement.setString(7, file);
callableStatement.setInt(8,s);
callableStatement.executeQuery();


cs.executeUpdate();

I get the following exception ....

java.sql.SQLException: Internal error when parsing callable statement metadata (missing parameter type)
at com.mysql.jdbc.DatabaseMetaData.getCallStmtParameterTypes(DatabaseMetaData.java:6963)
at com.mysql.jdbc.DatabaseMetaData.getProcedureColumns(DatabaseMetaData.java:2721)
at com.mysql.jdbc.CallableStatement.determineParameterTypes(CallableStatement.java:1048)
at com.mysql.jdbc.CallableStatement.<init>(CallableStatement.java:83)
at com.mysql.jdbc.Connection.prepareCall(Connection.java:1255)
at com.mysql.jdbc.Connection.prepareCall(Connection.java:1232)

I am able to execute this proc successfully from the QueryBrowser like this :

CALL SP_GetStatusReports(null,0,0,'2011-05-01',null,'Hello','C:/tmp/xyz.csv',1)

Thanks in advance!!



Edited 2 time(s). Last edit at 05/15/2011 11:06PM by swarupa paruchuri.

Options: ReplyQuote


Subject
Views
Written By
Posted
Internal error when parsing callable statement metadata (missing parameter type))
6988
May 12, 2011 07:02AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.