{"record":{"id":"1672eb2a9c21bf66","repo":"pentaho/pentaho-kettle","slug":"jobgetmailsfrompop-error-outputfoldernotexist","errorCode":null,"errorMessage":"JobGetMailsFromPOP.Error.OutputFolderNotExist","messagePattern":"JobGetMailsFromPOP\\.Error\\.OutputFolderNotExist","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/email-messages/impl/src/main/java/org/pentaho/di/job/entries/getpop/JobEntryGetPOP.java","lineNumber":1613,"sourceCode":"        }\n      }\n      if ( isDebug() ) {\n        switch ( folderType ) {\n          case JobEntryGetPOP.FOLDER_OUTPUT:\n            logDebug( BaseMessages.getString( PKG, \"JobGetMailsFromPOP.Log.OutputFolderExists\", folderName ) );\n            break;\n          case JobEntryGetPOP.FOLDER_ATTACHMENTS:\n            logDebug( BaseMessages.getString( PKG, \"JobGetMailsFromPOP.Log.AttachmentFolderExists\", folderName ) );\n            break;\n        }\n      }\n    } else {\n      if ( isCreateLocalFolder() ) {\n        folder.createFolder();\n      } else {\n        switch ( folderType ) {\n          case JobEntryGetPOP.FOLDER_OUTPUT:\n            throw new KettleException( BaseMessages.getString(\n              PKG, \"JobGetMailsFromPOP.Error.OutputFolderNotExist\", folderName ) );\n          case JobEntryGetPOP.FOLDER_ATTACHMENTS:\n            throw new KettleException( BaseMessages.getString(\n              PKG, \"JobGetMailsFromPOP.Error.AttachmentFolderNotExist\", folderName ) );\n        }\n      }\n    }\n\n    String returnValue = KettleVFS.getFilename( folder );\n    try {\n      folder.close();\n    } catch ( IOException ignore ) {\n      //Ignore error, as the folder was created successfully\n    }\n    return returnValue;\n  }\n}\n","sourceCodeStart":1595,"sourceCodeEnd":1631,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/email-messages/impl/src/main/java/org/pentaho/di/job/entries/getpop/JobEntryGetPOP.java#L1595-L1631","documentation":"createOutputDirectory(FOLDER_OUTPUT): when the resolved output folder does not exist and isCreateLocalFolder() is false, the entry refuses to create it and throws this KettleException with the folder name as a parameter. It honors the 'create folder' option instead of silently auto-creating directories.","triggerScenarios":"folder.exists() is false, isCreateLocalFolder() returns false, and folderType is FOLDER_OUTPUT — i.e. output directory missing on disk and 'Create local folder' (or equivalent option) not checked.","commonSituations":"Job configured on one machine then run on another (kitchen) where the directory does not exist; network share unmounted so the path is missing; 'create folder' checkbox deliberately unchecked but directory was later deleted.","solutions":["Create the output directory manually at the configured path before running the job.","Enable the 'Create local folder' option in the job entry so it auto-creates missing directories.","Verify the path (mount points, permissions) is available in the runtime environment where kitchen executes the job."],"exampleFix":"// before\nif ( isCreateLocalFolder() ) { folder.createFolder(); } else { throw ... }\n// after (fix in dialog): check 'Create folder'\n<create_local_folder>Y</create_local_folder>","handlingStrategy":"validation","validationCode":"File out = new File(environmentSubstitute(getOutputFolder()));\nif (!out.exists() && !out.mkdirs()) {\n  throw new IllegalArgumentException(\"Output directory missing and could not be created: \" + out);\n}","typeGuard":null,"tryCatchPattern":"try { executeJobEntry(); } catch (KettleException e) {\n  if (e.getMessage().contains(\"OutputFolderNotExist\")) {\n    logError(\"Output directory does not exist: \" + e.getMessage() + \" — create it or enable 'Create local folder'\");\n  } else { throw e; }\n}","preventionTips":["Enable 'Create local folder' unless external policies forbid auto-creation.","Provision required directories in deployment scripts/CI images.","Remember kitchen runs on the server filesystem — paths must exist there."],"tags":["kettle","email","filesystem","directory","configuration"],"backgroundTag":"directory-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"}