pentaho/pentaho-kettle · error · KettleException

KettleException( e )

Error message

KettleException( e )

What it means

In ExcelOutputMeta's external-resource path (getResourceDependencies / nameResource flow), any exception while resolving and renaming the output filename against a naming interface is wrapped in a bare KettleException. It indicates the step could not compute the resource name for its output file.

Solutions

  1. Inspect the cause stack trace; the wrapper adds no detail.
  2. Verify all ${VARIABLES} in the Excel output filename are defined in the VariableSpace at the time resources are resolved.
  3. Test the resolved filename resolves to a valid VFS-accessible URI.
  4. If triggered during resource export, check the export naming-interface configuration.
  5. Guard against null/empty fileName before calling getFileObject.

Example fix

// before
FileObject fileObject = KettleVFS.getInstance( space ).getFileObject( space.environmentSubstitute( fileName ), space );
// after
String resolved = space.environmentSubstitute( fileName );
if ( Const.isEmpty( resolved ) ) {
  throw new KettleException( "Excel output filename is empty after variable substitution" );
}
FileObject fileObject = KettleVFS.getInstance( space ).getFileObject( resolved, space );
Defensive patterns

Strategy: validation

Validate before calling

String resolved = space.environmentSubstitute( fileName );
if ( Const.isEmpty( resolved ) ) throw new KettleException( "Empty filename after substitution" );

Try / catch

try { /* resource naming */ } catch ( KettleException e ) { logError( "Resource name resolution failed: " + e.getCause(), e ); }

Prevention

When it happens

Trigger: The method calls KettleVFS.getInstance(...).getFileObject( space.environmentSubstitute( fileName ), space ) or namingInterface.nameResource(...) and either throws — invalid substituted path, VFS provider error, or naming-interface failure.

Common situations: Unset variables in the Excel output filename so environmentSubstitute yields a bad path; unsupported URI scheme for VFS; naming-interface misconfiguration when exporting resources; null fileName.

Understand the failure class

Background: "Invalid URL" / "URL cannot be empty": fix the malformed or missing URL behind request-construction failures — 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/627de722cec2a500. Report an issue: GitHub.

Appendix: source

Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/exceloutput/ExcelOutputMeta.java:1405

   * @return the filename of the exported resource
   */
  @Override
  public String exportResources( Bowl executionBowl, Bowl globalManagementBowl, VariableSpace space,
      Map<String, ResourceDefinition> definitions, ResourceNamingInterface namingInterface,
      Repository repository, IMetaStore metaStore ) throws KettleException {
    try {
      // The object that we're modifying here is a copy of the original!
      // So let's change the filename from relative to absolute by grabbing the file object...
      //
      if ( !Utils.isEmpty( fileName ) ) {
        FileObject fileObject = KettleVFS.getInstance( executionBowl )
          .getFileObject( space.environmentSubstitute( fileName ), space );
        fileName = namingInterface.nameResource( fileObject, space, true );
      }

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

  @Override
  public StepInterface getStep( StepMeta stepMeta, StepDataInterface stepDataInterface, int cnr,
    TransMeta transMeta, Trans trans ) {
    return new ExcelOutput( stepMeta, stepDataInterface, cnr, transMeta, trans );
  }

  @Override
  public StepDataInterface getStepData() {
    return new ExcelOutputData();
  }

  @Override
  public String[] getUsedLibraries() {
    return new String[] { "jxl.jar", };
  }

View on GitHub (pinned to f3058517a1)