{"record":{"id":"1d5833ce07271725","repo":"alibaba/DataX","slug":"200","errorCode":"-200","errorMessage":"Target job does not exist for id: {jobId}","messagePattern":"Target job does not exist for id: (.+?)","errorType":"error_code","errorClass":"AdsException","httpStatus":null,"severity":"error","filePath":"adswriter/src/main/java/com/alibaba/datax/plugin/writer/adswriter/load/AdsHelper.java","lineNumber":354,"sourceCode":"        if (userName == null) {\n            throw new AdsException(AdsException.ADS_CONN_USERNAME_NOT_SET,\n                    \"ADS JDBC connection user name was not set.\", null);\n        }\n\n        if (password == null) {\n            throw new AdsException(AdsException.ADS_CONN_PASSWORD_NOT_SET, \"ADS JDBC connection password was not set.\",\n                    null);\n        }\n\n        if (schema == null) {\n            throw new AdsException(AdsException.ADS_CONN_SCHEMA_NOT_SET, \"ADS JDBC connection schema was not set.\",\n                    null);\n        }\n\n        try {\n            String state = this.checkLoadDataJobStatusWithRetry(jobId);\n            if (state == null) {\n                throw new AdsException(AdsException.JOB_NOT_EXIST, \"Target job does not exist for id: \" + jobId, null);\n            }\n            if (state.equals(\"SUCCEEDED\")) {\n                return true;\n            } else if (state.equals(\"FAILED\")) {\n                throw new AdsException(AdsException.JOB_FAILED, \"Target job failed for id: \" + jobId, null);\n            } else {\n                return false;\n            }\n        } catch (Exception e) {\n            throw new AdsException(AdsException.OTHER, e.getMessage(), e);\n        } \n    }\n    \n    private String checkLoadDataJobStatusWithRetry(final String jobId)\n            throws AdsException {\n        try {\n            Class.forName(\"com.mysql.jdbc.Driver\");\n            final String finalAdsUrl = this.adsURL;","sourceCodeStart":336,"sourceCodeEnd":372,"githubUrl":"https://github.com/alibaba/DataX/blob/80ec23d5c5328eb90ca364d2749e92dfaf44541e/adswriter/src/main/java/com/alibaba/datax/plugin/writer/adswriter/load/AdsHelper.java#L336-L372","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"catch (AdsException e) {\n  String msg = e.getMessage();\n  if (msg != null && msg.contains(\"Target job does not exist\")) {\n    // verify jobId origin, resubmit load if the record was purged\n  }\n  throw e;\n}","preventionTips":["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"],"tags":["adswriter","job-status","ads","not-found"],"backgroundTag":null,"analyzedSha":"80ec23d5c5328eb90ca364d2749e92dfaf44541e","analyzedAt":"2026-08-14T15:33:51.187Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}