pentaho/pentaho-kettle · error · KettleException
JobGetMailsFromPOP.Error.OutputFolderEmpty
Error message
JobGetMailsFromPOP.Error.OutputFolderEmpty
What it means
createOutputDirectory(folderType) resolves the output folder name (after variable substitution) and throws this KettleException when the resolved folder path is empty for FOLDER_OUTPUT. The job entry must know where to write downloaded mail messages, so an empty output directory is a fatal configuration error.
Solutions
- Set a concrete absolute path in the 'Output directory' field of the Get Mails job entry.
- If using a variable, define it before execution (kettle.properties, Set Variables entry, or kitchen -param).
- Anchor relative variables on a known base, e.g. ${Internal.Job.Filename.Directory}/mails, and ensure the job is saved so that variable is populated.
Example fix
// before (kjb XML) <output_directory></output_directory> // after <output_directory>/data/pentaho/mail_out</output_directory>
Defensive patterns
Strategy: validation
Validate before calling
String out = environmentSubstitute(getOutputFolder());
if (out == null || out.trim().isEmpty()) {
throw new IllegalArgumentException("Output folder must be set before running the Get Mails entry");
} Try / catch
try { executeJobEntry(); } catch (KettleException e) {
if (e.getMessage().contains("OutputFolderEmpty")) {
logError("Output directory is empty; set output_directory in the job entry");
} else { throw e; }
} Prevention
- Always configure an absolute output directory in the dialog.
- Prefer absolute paths over variables for scheduled/kitchen runs.
- If a variable is needed, set it via Set Variables at the very start of the job.
When it happens
Trigger: execute() -> createOutputDirectory(FOLDER_OUTPUT) with Utils.isEmpty(folderName) true: the output directory field is blank or its environment variable resolves to empty.
Common situations: Job entry created/saved without setting 'Output directory'; variable like ${Internal.Job.Filename.Directory}/mail is used but the job is run standalone (kitchen) so it resolves empty; kjb XML edited by hand dropping the field.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- JobGetMailsFromPOP.Error.AttachmentFolderEmpty
- JobGetMailsFromPOP.Error.AttachmentFolderNotAFolder
- JobGetMailsFromPOP.Error.AttachmentFolderNotExist
- JobGetMailsFromPOP.Error.NotAFolderNot
- JobGetMailsFromPOP.Error.OutputFolderNotExist
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/cc0432a025a5d65d.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/email-messages/impl/src/main/java/org/pentaho/di/job/entries/getpop/JobEntryGetPOP.java:1580
throw new IllegalArgumentException( "Invalid folderType argument" );
}
String folderName = "";
switch ( folderType ) {
case JobEntryGetPOP.FOLDER_OUTPUT:
folderName = getRealOutputDirectory();
break;
case JobEntryGetPOP.FOLDER_ATTACHMENTS:
if ( isSaveAttachment() && isDifferentFolderForAttachment() ) {
folderName = getRealAttachmentFolder();
} else {
folderName = getRealOutputDirectory();
}
break;
}
if ( Utils.isEmpty( folderName ) ) {
switch ( folderType ) {
case JobEntryGetPOP.FOLDER_OUTPUT:
throw new KettleException( BaseMessages.getString( PKG, "JobGetMailsFromPOP.Error.OutputFolderEmpty" ) );
case JobEntryGetPOP.FOLDER_ATTACHMENTS:
throw new KettleException( BaseMessages.getString( PKG, "JobGetMailsFromPOP.Error.AttachmentFolderEmpty" ) );
}
}
FileObject folder = KettleVFS.getInstance( parentJobMeta.getBowl() ).getFileObject( folderName, this );
if ( folder.exists() ) {
if ( folder.getType() != FileType.FOLDER ) {
switch ( folderType ) {
case JobEntryGetPOP.FOLDER_OUTPUT:
throw new KettleException( BaseMessages.getString(
PKG, "JobGetMailsFromPOP.Error.NotAFolderNot", folderName ) );
case JobEntryGetPOP.FOLDER_ATTACHMENTS:
throw new KettleException( BaseMessages.getString(
PKG, "JobGetMailsFromPOP.Error.AttachmentFolderNotAFolder", folderName ) );
}
}
if ( isDebug() ) {
switch ( folderType ) {View on GitHub (pinned to f3058517a1)