AntoninoProva
Member
{
"status": "ERROR",
"message": "argument \"content\" is null",
"exception": "IllegalArgumentException",
"timeStamp": "2023-09-07T12:50:39.675+0200"
}
hi, i ran the query which is in the below code but it doesn't run because it gives this exception. Am I doing something wrong?
import com.oracle.e1.common.OrchestrationAttributes;
HashMap<String, Object> main(OrchestrationAttributes orchAttr, Sql sqlInst, HashMap inputMap)
{
HashMap<String, Object> returnMap = new HashMap<String, Object>();
orchAttr.writeWarn("START DB Groovy");
/*Query che fa select della tab crpdta.F0011W*/
String querySelect = "SELECT ICICUT AS CAMPO 1, ICICU AS CAMPO2 FROM schemaDB.F0011W"
def righe = sql.rows(querySelect);
try {
def jsonArray = JsonOutput.toJson(righe);
returnMap.put("DATI", jsonArray);
} catch (Exception e) {
orchAttr.writeWarn("ERRORE IN CONNECTOR: ");
returnMap.put("returnStatus", "Falso");
}
orchAttr.writeWarn("END DB Groovy");
return returnMap;
}
"status": "ERROR",
"message": "argument \"content\" is null",
"exception": "IllegalArgumentException",
"timeStamp": "2023-09-07T12:50:39.675+0200"
}
hi, i ran the query which is in the below code but it doesn't run because it gives this exception. Am I doing something wrong?
import com.oracle.e1.common.OrchestrationAttributes;
HashMap<String, Object> main(OrchestrationAttributes orchAttr, Sql sqlInst, HashMap inputMap)
{
HashMap<String, Object> returnMap = new HashMap<String, Object>();
orchAttr.writeWarn("START DB Groovy");
/*Query che fa select della tab crpdta.F0011W*/
String querySelect = "SELECT ICICUT AS CAMPO 1, ICICU AS CAMPO2 FROM schemaDB.F0011W"
def righe = sql.rows(querySelect);
try {
def jsonArray = JsonOutput.toJson(righe);
returnMap.put("DATI", jsonArray);
} catch (Exception e) {
orchAttr.writeWarn("ERRORE IN CONNECTOR: ");
returnMap.put("returnStatus", "Falso");
}
orchAttr.writeWarn("END DB Groovy");
return returnMap;
}