I am getting ORA-00900 error while trying the call the Oracle function from code, whereas it works from sqldeveloper. Code from which I am trying to call the Oracle function is below.
passwordCriteria = session.doReturningWork(connection -> {
try (CallableStatement function = connection
.prepareCall("{ ? = call test$ui_mob.password_change (?,?,?,?) }")) {
function.setEscapeProcessing(false);
function.registerOutParameter("p_response", Types.VARCHAR);
function.setString("p_username", "TEST_USER");
function.setString("p_companycode", "BSH");
function.setString("p_deviceid", "123456798");
function.setString("p_language", "en");
function.executeQuery();
return function.getString(1);
}
});
}
and stack trace is
Caused by: java.sql.SQLSyntaxErrorException: ORA-00900: invalid SQL statement