alibaba/DataX · error · AdsException
-200
-200
Error message
Target job does not exist for id: {jobId} What it means
Thrown by AdsHelper.checkLoadDataJobStatus when checkLoadDataJobStatusWithRetry(jobId) returns null for the job state. The retry helper queries ADS for the load-data job's state; a null state means ADS reported no such job for that id. Note the surrounding catch (Exception e) re-wraps exceptions as code OTHER, but this specific throw happens inside the try, so the AdsException propagates wrapped.
Source
Thrown at adswriter/src/main/java/com/alibaba/datax/plugin/writer/adswriter/load/AdsHelper.java:354
if (userName == null) {
throw new AdsException(AdsException.ADS_CONN_USERNAME_NOT_SET,
"ADS JDBC connection user name was not set.", null);
}
if (password == null) {
throw new AdsException(AdsException.ADS_CONN_PASSWORD_NOT_SET, "ADS JDBC connection password was not set.",
null);
}
if (schema == null) {
throw new AdsException(AdsException.ADS_CONN_SCHEMA_NOT_SET, "ADS JDBC connection schema was not set.",
null);
}
try {
String state = this.checkLoadDataJobStatusWithRetry(jobId);
if (state == null) {
throw new AdsException(AdsException.JOB_NOT_EXIST, "Target job does not exist for id: " + jobId, null);
}
if (state.equals("SUCCEEDED")) {
return true;
} else if (state.equals("FAILED")) {
throw new AdsException(AdsException.JOB_FAILED, "Target job failed for id: " + jobId, null);
} else {
return false;
}
} catch (Exception e) {
throw new AdsException(AdsException.OTHER, e.getMessage(), e);
}
}
private String checkLoadDataJobStatusWithRetry(final String jobId)
throws AdsException {
try {
Class.forName("com.mysql.jdbc.Driver");
final String finalAdsUrl = this.adsURL;View on GitHub (pinned to 80ec23d5c5)
Solutions
- Verify the jobId passed to checkLoadDataJobStatus is the one returned by the submit call on the same ADS instance/schema
- Check whether the job record expired or was purged on the ADS side and resubmit the load if needed
- If the job was just submitted, wait briefly and retry the status check to rule out visibility lag
- Confirm connection settings (url/schema) point at the same ADS account that owns the job
Defensive patterns
Strategy: retry
Try / catch
catch (AdsException e) {
String msg = e.getMessage();
if (msg != null && msg.contains("Target job does not exist")) {
// verify jobId origin, resubmit load if the record was purged
}
throw e;
} Prevention
- Persist the jobId returned by submit and reuse exactly that value for status checks
- Poll job status promptly after submission to avoid history expiry windows
- Ensure status checks run against the same ADS instance/schema that owns the job
When it happens
Trigger: Calling checkLoadDataJobStatus(jobId) with a job id that ADS does not know: expired/purged job history, job id from a different ADS instance or schema, typo in the id, or the job not yet registered when queried.
Common situations: Polling a load job after its record was cleaned up on the server; restart of a DataX task that stored a stale jobId; pointing the status check at the wrong ADS endpoint; race where the job was just submitted and not yet visible.
Related errors
AI-assisted analysis of alibaba/DataX@80ec23d5c5 (2026-08-14).
Data as JSON: /api/errors/1d5833ce07271725.
Report an issue: GitHub.