pentaho/pentaho-kettle · warning · KettleFileException
Error getting file resource!
Error message
Error getting file resource!
What it means
In getResourcesFromMeta of ExcelOutputMeta's external resource consumer, a null IExternalResourceInfo from ExternalResourceInfoFactory.createFileResource triggers this KettleFileException. It is immediately caught and swallowed by the adjacent catch block ('TODO throw or ignore?'), so it never propagates to callers.
Solutions
- Note this exception is currently swallowed — debug by logging inside the catch block or stepping through getResourcesFromMeta.
- Verify the Excel output filename resolves to a concrete, existing path after environment substitution.
- If resources must be reported, change the catch block to rethrow or collect the failure instead of ignoring it.
- Check that no null/empty filename is passed into KettleVFS.getFileObject before factory creation.
Example fix
// before
} catch ( KettleFileException kfe ) {
// TODO throw or ignore?
}
// after
} catch ( KettleFileException kfe ) {
log.logError( "Could not resolve file resource for path: " + path, kfe );
} Defensive patterns
Strategy: fallback
Validate before calling
FileObject fo = KettleVFS.getInstance( bowl ).getFileObject( path ); if ( fo == null || !fo.exists() ) logBasic( "Resource path not resolvable: " + path );
Try / catch
// exception is currently swallowed by the library; treat resource listing as best-effort and check logs
Prevention
- Set the Excel output filename to a concrete, existing path before running resource-dependent tooling.
- Remember failures here are silent — add your own logging or upgrade when the TODO is resolved.
When it happens
Trigger: createFileResource() returns null for the resolved file path of the Excel output while listing resources — typically when the FileObject for the step's filename cannot be turned into a file resource descriptor.
Common situations: Testing external resource dependencies (resources()/testExcelOutputExternalResourceConsumer) with an unresolvable or variable-substituted-wrong filename; filename points to a VFS location the factory cannot describe; running the step's resource test before the output file/path is valid.
Understand the failure class
Background: 'Could not be found', 'does not exist', 'not found in database': the resource-not-found family when an ID, slug, key, or URI lookup comes back empty — this error's family across 20 libraries.
Related errors
- ExcelInputLog.ImageFileNotExists
- KettleException( e )
- KettleException( e )
- Unable to add filename to the result
- Unable to load step info from XML
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b903dbb8a2a92e52.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/exceloutput/ExcelOutputExternalResourceConsumer.java:63
if ( !isDataDriven( meta ) /* TODO */ ) {
StepMeta parentStepMeta = meta.getParentStepMeta();
if ( parentStepMeta != null ) {
TransMeta parentTransMeta = parentStepMeta.getParentTransMeta();
if ( parentTransMeta != null ) {
String[] paths = meta.getFiles( parentTransMeta );
if ( paths != null ) {
resources = new ArrayList<IExternalResourceInfo>( paths.length );
for ( String path : paths ) {
if ( !Const.isEmpty( path ) ) {
try {
IExternalResourceInfo resource = ExternalResourceInfoFactory.createFileResource(
KettleVFS.getInstance( parentTransMeta.getBowl() ).getFileObject( path ), false );
if ( resource != null ) {
resources.add( resource );
} else {
throw new KettleFileException( "Error getting file resource!" );
}
} catch ( KettleFileException kfe ) {
// TODO throw or ignore?
}
}
}
}
}
}
}
return resources;
}
@Override
public Collection<IExternalResourceInfo> getResourcesFromRow( ExcelOutput excelOutput, RowMetaInterface rowMeta,
Object[] row ) {
Collection<IExternalResourceInfo> resources = new LinkedList<IExternalResourceInfo>();
// For some reason the step doesn't return the StepMetaInterface directly, so go around itView on GitHub (pinned to f3058517a1)