{"record":{"id":"bec5823b8be9e1ce","repo":"pentaho/pentaho-kettle","slug":"unable-to-read-script-values-help-file-from-file-strfilename-bec582","errorCode":null,"errorMessage":"Unable to read script values help file from file [<strFileName>]","messagePattern":"Unable to read script values help file from file \\[<strFileName>\\]","errorType":"exception","errorClass":"KettleXMLException","httpStatus":null,"severity":"warning","filePath":"ui/src/main/java/org/pentaho/di/ui/trans/steps/scriptvalues_mod/ScriptValuesHelp.java","lineNumber":90,"sourceCode":"          return ( elSample.getFirstChild().getNodeValue() );\n        }\n      }\n    }\n    return sRC;\n  }\n\n  private static void xparseXmlFile( String strFileName ) throws KettleXMLException {\n    try {\n      InputStream is = ScriptValuesHelp.class.getResourceAsStream( strFileName );\n      int c;\n      StringBuilder buffer = new StringBuilder();\n      while ( ( c = is.read() ) != -1 ) {\n        buffer.append( (char) c );\n      }\n      is.close();\n      dom = XMLHandler.loadXMLString( buffer.toString() );\n    } catch ( Exception e ) {\n      throw new KettleXMLException( \"Unable to read script values help file from file [\" + strFileName + \"]\", e );\n    }\n  }\n}\n","sourceCodeStart":72,"sourceCodeEnd":94,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/ui/src/main/java/org/pentaho/di/ui/trans/steps/scriptvalues_mod/ScriptValuesHelp.java#L72-L94","documentation":"ScriptValuesHelp.xparseXmlFile reads the bundled JavaScript-help XML file (strFileName) into a string and parses it with XMLHandler.loadXMLString. Any failure while reading or parsing the file (missing file, IO error, malformed XML) is wrapped in this KettleXMLException. It indicates the ScriptValues step's help documentation cannot be loaded, not a problem with the user's transformation.","triggerScenarios":"Opening the Script Values Mod step help when the help resource file is absent from the classpath/jar, unreadable, or contains invalid XML; an IOException from is.read()/close() or a parse exception from loadXMLString.","commonSituations":"Incomplete/partial Pentaho installation where the help XML was not shipped; corrupted jar; custom builds that excluded resource files; repackaged UI jars stripping resources.","solutions":["Verify the script values help XML resource exists in the ui/plugin jar and is on the classpath","Reinstall or repair the Pentaho Data Integration installation to restore missing resources","Check file read permissions on the jar/resource location","If the file is custom-edited, validate it is well-formed XML (e.g. xmllint)"],"exampleFix":"// before: loading help silently assumed resource present\nKettleXMLException e = new KettleXMLException(\"Unable to read script values help file from file [\" + strFileName + \"]\", e);\n// after: guard caller before parsing\nif ( new File( strFileName ).canRead() ) { dom = XMLHandler.loadXMLString( readFully( strFileName ) ); } else { logMissingHelp( strFileName ); }","handlingStrategy":"try-catch","validationCode":"// Java: verify the help resource is present and readable before parsing\njava.io.InputStream is = getClass().getResourceAsStream( strFileName );\nif ( is == null ) throw new IllegalStateException( \"Help resource missing: \" + strFileName );","typeGuard":"boolean helpFileReadable = strFileName != null && getClass().getResourceAsStream( strFileName ) != null;","tryCatchPattern":"try { help.load(); } catch ( KettleXMLException e ) { log.warn( \"Script help unavailable, continuing without it\", e ); /* degrade gracefully */ }","preventionTips":["Keep resource files packaged in the plugin jar when building","Validate bundled XML resources in CI (well-formedness check)","Never strip resource folders when repackaging UI jars"],"tags":["xml","file-read","help-documentation","ui"],"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"}