{"record":{"id":"5ed52173b03a0fc0","repo":"pentaho/pentaho-kettle","slug":"kettleexception-e-jsoninputmeta","errorCode":null,"errorMessage":"KettleException(e)","messagePattern":"KettleException\\(e\\)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/json/core/src/main/java/org/pentaho/di/trans/steps/jsoninput/JsonInputMeta.java","lineNumber":1138,"sourceCode":"            //\n            if ( fileObject.exists() ) {\n              // Convert to an absolute path and add it to the list.\n              //\n              newFilenames.add( fileObject.getName().getPath() );\n            }\n          }\n\n          // Still here: set a new list of absolute filenames!\n          //\n          setFileName( newFilenames.toArray( new String[newFilenames.size()] ) );\n          setFileMask( new String[newFilenames.size()] ); // all null since converted to absolute path.\n          setFileRequired( new String[newFilenames.size()] ); // all null, turn to \"Y\" :\n          Arrays.fill( getFileRequired(), YES );\n        }\n      }\n      return null;\n    } catch ( Exception e ) {\n      throw new KettleException( e );\n    }\n  }\n\n  @Override\n  public String getEncoding() {\n    return \"UTF-8\";\n  }\n  @Override\n  public StepHelperInterface getStepHelperInterface() {\n    return new JsonInputHelper();\n  }\n\n  // Needed for PDI-19138 purposes\n  public static boolean getIncludeNullsProperty() {\n    return \"Y\".equalsIgnoreCase( System.getProperty( Const.KETTLE_JSON_INPUT_INCLUDE_NULLS, \"N\" ) );\n  }\n\n}","sourceCodeStart":1120,"sourceCodeEnd":1156,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/json/core/src/main/java/org/pentaho/di/trans/steps/jsoninput/JsonInputMeta.java#L1120-L1156","documentation":"KettleException wrapping any Exception thrown in the JsonInputMeta file-listing logic (getFiles path) that builds the file/required arrays from resolved filenames. It means the step could not compute its input file list — typically a failure while expanding wildcards or resolving filenames via the variable space.","triggerScenarios":"During file-list computation (FileInputList creation / setFileRequired / Arrays.fill block): exception while resolving wildcard directories, expanding ${variables} in file paths, or accessing the directory to enumerate matching files.","commonSituations":"Wildcard pattern pointing at a nonexistent or unreadable directory; invalid glob characters; unresolved environment variables in file/folder names; VFS provider errors for remote schemes (SFTP, S3).","solutions":["Check the wrapped cause in the log; usually a bad directory or filename pattern in the step's File tab.","Test that the wildcard base directory exists and is readable by the Pentaho user (ls the path).","Replace or define any ${VARIABLE} used in file/folder names and re-run.","Simplify the wildcard (test in a shell with the same glob) to confirm which pattern fails."],"exampleFix":"// before: File/Directory tab\n${DATA_DIR}/logs/*.json   // DATA_DIR undefined\n// after: define the variable, or use an absolute path\n-D DATA_DIR=/opt/etd/data  or  /opt/etd/data/logs/*.json","handlingStrategy":"validation","validationCode":"// verify the wildcard base directory resolves before running\nString dir = space.environmentSubstitute(\"${DATA_DIR}/logs\");\nif (!Files.isDirectory(Paths.get(dir))) throw new IllegalStateException(\"Base dir missing: \" + dir);","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Define all ${VARIABLES} used in file/folder settings (kettle.properties or runtime args).","Test wildcard patterns in a shell on the same host Pentaho runs on.","Ensure the Pentaho service account can read the target directories.","For remote schemes, verify the VFS provider works with a simple file listing first."],"tags":["file-listing","wildcard","variables","kettle"],"backgroundTag":"file-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"}