diff --git a/inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java b/inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java index 1f9fa41f98..ef8d247455 100644 --- a/inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java +++ b/inlong-manager/manager-schedule/src/main/java/org/apache/inlong/manager/schedule/dolphinscheduler/DolphinScheduleUtils.java @@ -296,7 +296,10 @@ public boolean releaseProcessDef(String processDefUrl, long processDefCode, Stri try { JsonObject response = executeHttpRequest(url, HTTP_POST, queryParam, header, null); - return response.get(DS_RESPONSE_DATA).getAsBoolean(); + if (response != null && !response.get(DS_RESPONSE_DATA).isJsonNull()) { + return response.get(DS_RESPONSE_DATA).getAsBoolean(); + } + return false; } catch (IOException e) { LOGGER.error("Unexpected wrong in release process definition", e); return false; @@ -367,7 +370,7 @@ public boolean onlineScheduleForProcessDef(String scheduleUrl, int scheduleId, S String url = scheduleUrl + "/" + scheduleId + DS_ONLINE_URL; try { JsonObject response = executeHttpRequest(url, HTTP_POST, new HashMap<>(), header, null); - if (response != null) { + if (response != null && !response.get(DS_RESPONSE_DATA).isJsonNull()) { return response.get(DS_RESPONSE_DATA).getAsBoolean(); } } catch (IOException e) {