pentaho/pentaho-kettle · error · KettleException

e (no own message; error resolving resource/naming for…

Error message

e (no own message; error resolving resource/naming for input files)

What it means

CsvInputMeta.exportResources() resolves filenames and naming conflicts when exporting a transformation, and rethrows any unexpected exception as a message-less KettleException. It means resource substitution (turning absolute file paths into relative/exported references) for one of the input files failed, aborting the export.

Solutions

  1. Check the chained cause e to identify which filename/operation failed.
  2. Ensure every CSV Input step has a resolvable filename (replace unresolvable variables with real paths or environment-substitutable values).
  3. Fix malformed paths (mixed separators, invalid characters, URLs) in the step's file tab.
  4. Export with the environment/variables defined so filenames can be substituted.

Example fix

// before
filenameField = "${MY_VAR}/data.csv"; // MY_VAR undefined at export
// after: set the variable before exporting
transMeta.setVariable("MY_VAR", "/opt/data");
Defensive patterns

Strategy: validation

Validate before calling

String fn = meta.getFilename() == null ? null : transMeta.environmentSubstitute(meta.getFilename());
if (fn == null || fn.isEmpty()) throw new IllegalArgumentException("CSV Input filename must be set before export");
if (!new File(fn).exists()) throw new IllegalArgumentException("File does not exist: " + fn);

Try / catch

try { exported = transMeta.exportResources(...); }
catch (KettleException e) {
  if (e.getCause() != null && e.getMessage() == null) {
    log.error("Resource export failed", e.getCause());
  }
}

Prevention

When it happens

Trigger: TransMeta.exportResources or 'Export transformation' when computing the resource path for a CSV filename throws — e.g. a null/empty filename, an invalid URL, or an exception from the underlying resource referencing logic.

Common situations: CSV Input step with a variable-based filename that cannot be substituted at export time; step configured with no filename at all; exporting on a different OS where the absolute path doesn't parse.

Understand the failure class

Background: "File not found" and ENOENT errors: why libraries can't find a file that should exist — this error's family across 50 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/cf7150261518243a. Report an issue: GitHub.

Appendix: source

Thrown at engine/src/main/java/org/pentaho/di/trans/steps/csvinput/CsvInputMeta.java:807

        // From : ${Internal.Transformation.Filename.Directory}/../foo/bar.csv
        // To : /home/matt/test/files/foo/bar.csv
        //
        FileObject fileObject = KettleVFS.getInstance( executionBowl )
          .getFileObject( space.environmentSubstitute( filename ), space );

        // If the file doesn't exist, forget about this effort too!
        //
        if ( fileObject.exists() ) {
          // Convert to an absolute path...
          //
          filename = namingInterface.nameResource( fileObject, space, true );

          return filename;
        }
      }
      return null;
    } catch ( Exception e ) {
      throw new KettleException( e );
    }
  }

  @Override
  public boolean supportsErrorHandling() {
    return true;
  }

  @Override
  public StepMetaInjectionInterface getStepMetaInjectionInterface() {

    return this;
  }

  @Override
  public void injectStepMetadataEntries( List<StepInjectionMetaEntry> metadata ) {
    for ( StepInjectionMetaEntry entry : metadata ) {
      KettleAttributeInterface attr = findAttribute( entry.getKey() );

View on GitHub (pinned to f3058517a1)