{"record":{"id":"7eddc9bb49b9439c","repo":"apache/seatunnel","slug":"restoresourcejobid-is-required-when-restoremode-ch","errorCode":null,"errorMessage":"restoreSourceJobId is required when restoreMode=CHECKPOINT","messagePattern":"restoreSourceJobId is required when restoreMode=CHECKPOINT","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-client/src/main/java/org/apache/seatunnel/engine/client/SeaTunnelClient.java","lineNumber":126,"sourceCode":"                filePath,\n                variables,\n                hazelcastClient,\n                seaTunnelConfig,\n                RestoreMode.SAVEPOINT,\n                jobId,\n                jobId);\n    }\n\n    @Override\n    public ClientJobExecutionEnvironment restoreFromCheckpointExecutionContext(\n            @NonNull String filePath,\n            List<String> variables,\n            @NonNull JobConfig jobConfig,\n            @NonNull SeaTunnelConfig seaTunnelConfig,\n            @NonNull Long sourceJobId,\n            Long jobId) {\n        if (sourceJobId == null) {\n            throw new IllegalArgumentException(\n                    \"restoreSourceJobId is required when restoreMode=CHECKPOINT\");\n        }\n        return new ClientJobExecutionEnvironment(\n                jobConfig,\n                filePath,\n                variables,\n                hazelcastClient,\n                seaTunnelConfig,\n                RestoreMode.CHECKPOINT,\n                sourceJobId,\n                jobId);\n    }\n\n    @Override\n    public JobClient createJobClient() {\n        return new JobClient(hazelcastClient);\n    }\n","sourceCodeStart":108,"sourceCodeEnd":144,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-client/src/main/java/org/apache/seatunnel/engine/client/SeaTunnelClient.java#L108-L144","documentation":"SeaTunnelClient.restoreFromCheckpointExecutionContext validates that sourceJobId (the original job whose checkpoint is being restored) is non-null when restoreMode=CHECKPOINT. Without it the engine cannot locate the checkpoint of the source job, so it fails fast with IllegalArgumentException.","triggerScenarios":"Calling the CHECKPOINT-mode restore path (createExecutionEnvironment with restoreMode=CHECKPOINT) while passing null for sourceJobId.","commonSituations":"Developer enables checkpoint restore but forgets to supply restoreSourceJobId in the submission request or CLI flags; copied snippet drops the restore parameter; older client versions that do not send the id.","solutions":["Pass the original job's id via restoreSourceJobId in the submission request or the client CLI flag.","If a plain run was intended, remove the restoreMode=CHECKPOINT options.","When calling the constructor path programmatically, supply a non-null Long sourceJobId.","Upgrade client and engine together if one side predates the restore API."],"exampleFix":"// before\nclient.createExecutionEnvironment(filePath, variables, jobConfig, seaTunnelConfig, null, jobId);\n// after\nclient.createExecutionEnvironment(filePath, variables, jobConfig, seaTunnelConfig, sourceJobId, jobId);","handlingStrategy":"validation","validationCode":"if (restoreMode == RestoreMode.CHECKPOINT && (sourceJobId == null || sourceJobId <= 0)) {\n    throw new IllegalArgumentException(\"restoreSourceJobId is required for CHECKPOINT restore\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    return client.createExecutionEnvironment(filePath, variables, jobConfig, cfg, sourceJobId, jobId);\n} catch (IllegalArgumentException e) {\n    if (e.getMessage().contains(\"restoreSourceJobId\")) {\n        throw new ConfigurationException(\"Supply restoreSourceJobId for CHECKPOINT restore\", e);\n    }\n    throw e;\n}","preventionTips":["Persist the original job id whenever you may restore from it later.","Use a typed RestoreOptions object so sourceJobId cannot be omitted.","Add a client-side preflight check before submitting restore jobs."],"tags":["config","restore","argument-validation"],"backgroundTag":"missing-required-argument","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}