We are trying to migrate Oracle to Postgres and in the process I have changed database connection parameter to Postgres.
But I am trying to run the same code then I am getting below exception:
Exception in thread "main" org.springframework.dao.DataIntegrityViolationException: CallableStatementCallback; SQL [{? = call environment_management.get_connection_details_1()}]; No value specified for parameter 1.; nested exception is org.postgresql.util.PSQLException: No value specified for parameter 1.
static final String GET_APPLICATION_CONNECTIONS_FUNCTION = "get_connection_details";
static final String APPLICATION_CONNECTIONS_RESULT_SET = "lv_conn_record";
this.getApplicationConnectionsFunction = createSimpleJdbcCallForFunction(ENVIRONMENT_MANAGEMENT_CATALOG, GET_APPLICATION_CONNECTIONS_FUNCTION);
this.getApplicationConnectionsFunction.returningResultSet(APPLICATION_CONNECTIONS_RESULT_SET,
new ConnectionRowMapper());
Map<String, Object> applicationConnectionsResultMap =
getApplicationConnectionsFunction.execute();
If I am providing wrong function name too then also it is throwing same error. It means, it is not reaching Postgres database at all and throwing error before that . In postgres function, we don't have input parameter but having refcursor as output.