我试图调用一个只有一个输出参数而没有输入参数的存储过程。当我如下所示调用存储过程时,出现“调用中的参数数量或类型错误”错误
SimpleJdbcCall jdbcCall = new SimpleJdbcCall(springTemplate)
.withCatalogName("my_package").withProcedureName("my_procedure")
.withReturnValue().withoutProcedureColumnMetaDataAccess()
.declareParameters(new SqlOutParameter("return", Types.VARCHAR));
Map out = jdbcCall.execute();
System.out.println((String)out.get("return"));
我不确定这里出了什么问题。我得到了错误
org.springframework.jdbc.BadSqlGrammarException: CallableStatementCallback;
bad SQL grammar [{? = call my_package.my_procedure()}]; nested exception is
java.sql.SQLException: ORA-06550: line 1, column 13:
PLS-00306: wrong number or types of arguments in call to 'my_procedure'
ORA-06550: line 1, column 7:
任何帮助将不胜感激 PL/SQL: Statement被忽略