{"record":{"id":"e74cbb5ee4e263db","repo":"apache/seatunnel","slug":"the-jobid-must-not-be-empty-e74cbb","errorCode":null,"errorMessage":"The jobId must not be empty.","messagePattern":"The jobId must not be empty\\.","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":400,"severity":"error","filePath":"seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/CheckpointOverviewServlet.java","lineNumber":44,"sourceCode":"import javax.servlet.http.HttpServletResponse;\n\nimport java.io.IOException;\n\npublic class CheckpointOverviewServlet extends BaseServlet {\n\n    private final CheckpointMonitorRestService restService;\n\n    public CheckpointOverviewServlet(NodeEngineImpl nodeEngine) {\n        super(nodeEngine);\n        this.restService = new CheckpointMonitorRestService(nodeEngine);\n    }\n\n    @Override\n    protected void doGet(HttpServletRequest req, HttpServletResponse resp)\n            throws ServletException, IOException {\n        String jobIdStr = req.getPathInfo();\n        if (jobIdStr == null || jobIdStr.length() <= 1) {\n            throw new IllegalArgumentException(\"The jobId must not be empty.\");\n        }\n        long jobId = Long.parseLong(jobIdStr.substring(1));\n        writeJson(resp, restService.getOverview(jobId));\n    }\n}\n","sourceCodeStart":26,"sourceCodeEnd":50,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-engine/seatunnel-engine-server/src/main/java/org/apache/seatunnel/engine/server/rest/servlet/CheckpointOverviewServlet.java#L26-L50","documentation":"CheckpointOverviewServlet.doGet extracts the jobId from path info; if pathInfo is null or just a slash it throws IllegalArgumentException because checkpoint overview data is per-job. The servlet serves a single job's checkpoint overview at GET .../<jobId>.","triggerScenarios":"GET the checkpoint-overview endpoint with no /<jobId> suffix, e.g. GET /checkpoint-overview/ or a request whose pathInfo resolves to null.","commonSituations":"Dashboards constructing the URL with an empty job variable; job id lost after restart of the calling tool; user hitting the servlet root directly in a browser.","solutions":["Call the endpoint with a valid numeric job id in the path, e.g. /checkpoint-overview/882721898075455489","Guard the client code so the request is only made when jobId is set","Return HTTP 400 instead of an unhandled exception for blank ids","Verify any URL-rewriting middleware preserves the path segment"],"exampleFix":"// before\nString url = \"/checkpoint-overview\"; // no jobId\n// after\nString url = \"/checkpoint-overview/\" + jobId.toString();","handlingStrategy":"validation","validationCode":"if (jobId == null) throw new IllegalStateException(\"jobId not set; cannot query checkpoint overview\");","typeGuard":"boolean hasJobId(String pathInfo) { return pathInfo != null && pathInfo.length() > 1; }","tryCatchPattern":"try { overview = getOverview(jobId); } catch (IllegalArgumentException e) { renderUsageError(\"checkpoint-overview/<jobId>\"); }","preventionTips":["Never call monitoring endpoints before job submission returns an id","Guard UI code with jobId presence checks","Keep the jobId in request-scoped state, not static state"],"tags":["rest","validation","jobid"],"backgroundTag":"empty-required-field","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}