{"record":{"id":"86c906fe2e966255","repo":"pentaho/pentaho-kettle","slug":"i-couldn-t-find-notepad-with-id-note-id-note-in-the","errorCode":null,"errorMessage":"I couldn't find Notepad with id_note=id_note in the repository.","messagePattern":"I couldn't find Notepad with id_note=id_note in the repository\\.","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryNotePadDelegate.java","lineNumber":94,"sourceCode":"        note.setBackGroundColorGreen( (int) r.getInteger(\n          \"FONT_BACK_GROUND_COLOR_GREEN\", NotePadMeta.COLOR_RGB_DEFAULT_BG_GREEN ) );\n        note.setBackGroundColorBlue( (int) r.getInteger(\n          \"FONT_BACK_GROUND_COLOR_BLUE\", NotePadMeta.COLOR_RGB_DEFAULT_BG_BLUE ) );\n\n        // Border color\n        note.setBorderColorRed( (int) r.getInteger(\n          \"FONT_BORDER_COLOR_RED\", NotePadMeta.COLOR_RGB_DEFAULT_BORDER_RED ) );\n        note.setBorderColorGreen( (int) r.getInteger(\n          \"FONT_BORDER_COLOR_GREEN\", NotePadMeta.COLOR_RGB_DEFAULT_BORDER_GREEN ) );\n        note.setBorderColorBlue( (int) r.getInteger(\n          \"FONT_BORDER_COLOR_BLUE\", NotePadMeta.COLOR_RGB_DEFAULT_BORDER_BLUE ) );\n        note.setDrawShadow( r.getBoolean( \"DRAW_SHADOW\", true ) );\n\n        // Done!\n        return note;\n      } else {\n        note.setObjectId( null );\n        throw new KettleException( \"I couldn't find Notepad with id_note=\" + id_note + \" in the repository.\" );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      note.setObjectId( null );\n      throw new KettleException( \"Unable to load Notepad from repository (id_note=\" + id_note + \")\", dbe );\n    }\n  }\n\n  /**\n   *\n   * @param rep\n   * @param id_transformation\n   * @throws KettleException\n   */\n  public void saveNotePadMeta( NotePadMeta note, ObjectId id_transformation ) throws KettleException {\n    try {\n      Point location = note.getLocation();\n      int x = location == null ? -1 : location.x;\n      int y = location == null ? -1 : location.y;","sourceCodeStart":76,"sourceCodeEnd":112,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryNotePadDelegate.java#L76-L112","documentation":"loadNotePadMeta throws this KettleException when a SELECT by id_note on the R_NOTE table returns no row, meaning the note pad ID does not exist in the repository. It signals a dangling/stale reference rather than a database failure (database errors throw the sibling message at line 98).","triggerScenarios":"Calling loadNotePadMeta(id_note) with an id_note that has no corresponding row in R_NOTE — e.g. referencing a note that was deleted by another user/session, or an ID copied from an incompatible repository.","commonSituations":"Stale cached transformation/job metadata referencing deleted notes; two clients editing the same transformation concurrently; pointing code at a different repository than the IDs came from.","solutions":["Verify the id_note exists: SELECT * FROM R_NOTE WHERE ID_NOTE = <id>","Reload the parent transformation/job from the repository to get fresh, valid note IDs","If the note was deleted legitimately, remove/null the dangling note reference before saving","Confirm you are connected to the same repository the ID was obtained from"],"exampleFix":"// before\nNotePadMeta note = delegate.loadNotePadMeta(idNote);\n// after\nNotePadMeta note;\ntry { note = delegate.loadNotePadMeta(idNote); }\ncatch (KettleException e) {\n  log.warn(\"Note \" + idNote + \" no longer exists; skipping\");\n  note = null; // remove stale reference from parent meta\n}","handlingStrategy":"try-catch","validationCode":"RowMetaAndData row = repository.getDatabase().getOneRow(\"SELECT ID_NOTE FROM R_NOTE WHERE ID_NOTE = ?\", idNote.longValue());\nif (row == null) throw new IllegalStateException(\"Note \" + idNote + \" does not exist\");","typeGuard":"boolean noteExists(KettleDatabaseRepository repo, ObjectId id) { try { return id != null && repo.getNotePadMeta(id) != null; } catch (Exception e) { return false; } }","tryCatchPattern":"try { note = delegate.loadNotePadMeta(idNote); } catch (KettleException e) { log.warn(\"Note \" + idNote + \" not found — removing stale reference\"); note = null; }","preventionTips":["Reload parent transformation/job metadata before relying on cached note IDs","Catch this exception and prune dangling note references instead of failing","Avoid sharing ObjectIds across different repositories","Handle concurrent edits by re-reading before save"],"tags":["repository","not-found","notepad","stale-reference"],"backgroundTag":"record-not-found","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}