I trying to call a stored procedure which only has one out parameter and no input parameter. When I call the stored procedure as shown below, I get "wrong number or types of arguments in call to" error
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"));
I am not sure whats wrong here.I get the error
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:
Any help will be very much appreciated PL/SQL: Statement ignored