{"record":{"id":"9a6896edad198478","repo":"pentaho/pentaho-kettle","slug":"unable-to-read-notepad-info-from-xml","errorCode":null,"errorMessage":"Unable to read Notepad info from XML","messagePattern":"Unable to read Notepad info from XML","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/core/NotePadMeta.java","lineNumber":165,"sourceCode":"      this.fontcolorblue =\n        Const.toInt( XMLHandler.getTagValue( notepadnode, \"fontcolorblue\" ), COLOR_RGB_BLACK_BLUE );\n      // background color\n      this.backgroundcolorred =\n        Const.toInt( XMLHandler.getTagValue( notepadnode, \"backgroundcolorred\" ), COLOR_RGB_DEFAULT_BG_RED );\n      this.backgroundcolorgreen =\n        Const.toInt( XMLHandler.getTagValue( notepadnode, \"backgroundcolorgreen\" ), COLOR_RGB_DEFAULT_BG_GREEN );\n      this.backgroundcolorblue =\n        Const.toInt( XMLHandler.getTagValue( notepadnode, \"backgroundcolorblue\" ), COLOR_RGB_DEFAULT_BG_BLUE );\n      // border color\n      this.bordercolorred =\n        Const.toInt( XMLHandler.getTagValue( notepadnode, \"bordercolorred\" ), COLOR_RGB_DEFAULT_BORDER_RED );\n      this.bordercolorgreen =\n        Const.toInt( XMLHandler.getTagValue( notepadnode, \"bordercolorgreen\" ), COLOR_RGB_DEFAULT_BORDER_GREEN );\n      this.bordercolorblue =\n        Const.toInt( XMLHandler.getTagValue( notepadnode, \"bordercolorblue\" ), COLOR_RGB_DEFAULT_BORDER_BLUE );\n      this.drawshadow = \"Y\".equalsIgnoreCase( XMLHandler.getTagValue( notepadnode, \"drawshadow\" ) );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to read Notepad info from XML\", e );\n    }\n  }\n\n  public ObjectId getObjectId() {\n    return id;\n  }\n\n  public void setObjectId( ObjectId id ) {\n    this.id = id;\n  }\n\n  public void setLocation( int x, int y ) {\n    if ( x != location.x || y != location.y ) {\n      setChanged();\n    }\n    location.x = x;\n    location.y = y;\n  }","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/core/NotePadMeta.java#L147-L183","documentation":"The NotePadMeta(Node) constructor parses the <notepad> XML node of a transformation/job file; any exception while reading its tag values (bounds, colors, fonts, shadow flag) is wrapped as KettleXMLException 'Unable to read Notepad info from XML'. It indicates a malformed or incomplete note element in the .ktr/.kjb file.","triggerScenarios":"Constructing NotePadMeta from an XML node whose child tags (xlocation, ylocation, width, height, fontname, borderscolor, etc.) are missing, non-numeric, or the node itself is null.","commonSituations":"Hand-edited or externally generated .ktr/.kjb files with damaged <notepad> blocks; older file versions lacking newer attributes combined with stricter parsing; corrupted files from failed VCS merges or truncation.","solutions":["Open the file, locate the <notepad> element, and fix/remove the malformed attributes; the chained cause (getCause()) names the exact problem.","If the note is dispensable, delete the whole <notepad> node from the XML and reopen the file.","Re-save the transformation/job from Spoon to regenerate valid XML.","Restore the file from version control or backup."],"exampleFix":"// before\n<notepad>\n  <xlocation>abc</xlocation>\n</notepad>\n// after\n<notepad>\n  <xlocation>100</xlocation>\n  <ylocation>100</ylocation>\n  <width>200</width>\n  <height>50</height>\n  <fontname>Arial</fontname>\n</notepad>","handlingStrategy":"try-catch","validationCode":"Node np = XMLHandler.getSubNode(transNode, \"notepad\");\nif (np != null && Const.toInt(XMLHandler.getTagValue(np, \"xlocation\"), -1) < 0) {\n  throw new KettleXMLException(\"Invalid <notepad> block\");\n}","typeGuard":null,"tryCatchPattern":"try { NotePadMeta n = new NotePadMeta(notepadNode); } catch (KettleXMLException e) { logError(\"Skipping corrupt note: \" + e.getCause(), e); }","preventionTips":["Do not hand-edit .ktr/.kjb note XML; edit in Spoon","Validate kettle files with XML schema before loading programmatically","Restore from VCS when a merge corrupts metadata"],"tags":["xml","metadata","parse-error"],"backgroundTag":"file-read-failed","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"}