{"record":{"id":"9ffd47589191fea5","repo":"pentaho/pentaho-kettle","slug":"rssoutput-meta-errorgettingfile","errorCode":null,"errorMessage":"RssOutput.Meta.ErrorGettingFile","messagePattern":"RssOutput\\.Meta\\.ErrorGettingFile","errorType":"exception","errorClass":"KettleStepException","httpStatus":null,"severity":"error","filePath":"plugins/rss/impl/src/main/java/org/pentaho/di/trans/steps/rssoutput/RssOutputMeta.java","lineNumber":571,"sourceCode":"      for ( int part = 0; part < parts; part++ ) {\n        retval[i] = buildFilename( bowl, space, copy );\n        i++;\n      }\n    }\n    if ( i < nr ) {\n      retval[i] = \"...\";\n    }\n\n    return retval;\n  }\n\n  private String getFilename( Bowl bowl, VariableSpace space ) throws KettleStepException {\n    FileObject file = null;\n    try {\n      file = KettleVFS.getInstance( bowl ).getFileObject( space.environmentSubstitute( getFileName() ) );\n      return KettleVFS.getFilename( file );\n    } catch ( Exception e ) {\n      throw new KettleStepException( BaseMessages\n        .getString( PKG, \"RssOutput.Meta.ErrorGettingFile\", getFileName() ), e );\n    } finally {\n      if ( file != null ) {\n        try {\n          file.close();\n        } catch ( Exception e ) { /* Ignore */\n        }\n      }\n    }\n  }\n\n  public String buildFilename( Bowl bowl, VariableSpace space, int stepnr ) throws KettleStepException {\n\n    SimpleDateFormat daf = new SimpleDateFormat();\n\n    // Replace possible environment variables...\n    String retval = getFilename( bowl, space );\n","sourceCodeStart":553,"sourceCodeEnd":589,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/rss/impl/src/main/java/org/pentaho/di/trans/steps/rssoutput/RssOutputMeta.java#L553-L589","documentation":"RssOutputMeta.getFilename() resolves the output file via KettleVFS and wraps any failure (invalid path, non-existent parent directory, filesystem errors) in a KettleStepException with the 'ErrorGettingFile' message including the configured file name. This runs during metadata validation (getFields/row layout), before rows are processed.","triggerScenarios":"KettleVFS.getFileObject(space.environmentSubstitute(getFileName())) throws — the configured output filename cannot be resolved or opened through VFS (bad path, unresolved variable, unsupported protocol, IO error).","commonSituations":"Output directory does not exist on the execution host; ${Internal.Transformation.Filename.Directory} or custom variables unresolved when running via Kitchen; file path uses Windows-style separators on Linux; permissions or an unreachable network share.","solutions":["Verify the configured output file path exists / its parent directory is present on the machine running the transformation.","Check that any ${variables} in the filename are defined in the transformation/job or passed via Kitchen -param.","Use platform-correct absolute paths (KettleVFS resolves relative to the transformation location).","Fix filesystem permissions or network share availability for the target directory."],"exampleFix":"// before\nmeta.setFileName(\"${OUT_DIR}/feed.xml\"); // OUT_DIR undefined\n// after\nmeta.setFileName(\"/data/rss/feed.xml\"); // or define OUT_DIR as a parameter","handlingStrategy":"try-catch","validationCode":"// Validate the resolved output path before running the transformation:\nString resolved = space.environmentSubstitute(meta.getFileName());\nFile parent = new File(resolved).getAbsoluteFile().getParentFile();\nif (parent == null || !parent.isDirectory()) {\n    throw new IllegalStateException(\"Output directory does not exist: \" + parent);\n}","typeGuard":null,"tryCatchPattern":"try {\n    transformation.execute();\n} catch (KettleStepException e) {\n    if (e.getMessage().contains(\"ErrorGettingFile\")) {\n        log.error(\"Cannot resolve RSS output file path: \" + e.getMessage());\n    }\n}","preventionTips":["Pre-create output directories on every execution host","Define all filename variables as transformation/job parameters with defaults","Use forward slashes and absolute paths for cross-platform runs","Check share/permission access for the service account running Kitchen"],"tags":["pentaho-kettle","vfs","file-path","rss-output"],"backgroundTag":"file-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"}