{"record":{"id":"5cdcfd216edc2eff","repo":"pentaho/pentaho-kettle","slug":"propertyinput-error-cannotfindsection","errorCode":null,"errorMessage":"PropertyInput.Error.CanNotFindSection","messagePattern":"PropertyInput\\.Error\\.CanNotFindSection","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/propertyinput/PropertyInput.java","lineNumber":473,"sourceCode":"   * @throws ConfigurationException\n   * @throws IOException\n   */\n  private void loadIniFile() throws ConfigurationException, IOException, KettleException {\n    data.iniConf = new INIConfiguration();\n    FileHandler handler = new FileHandler( data.iniConf );\n\n    try ( InputStream inputStream = KettleVFS.getInputStream( data.file ) ) {\n      if ( !Utils.isEmpty( data.realEncoding ) ) {\n        handler.setEncoding( data.realEncoding );\n      }\n      handler.load( inputStream );\n      Set<String> sections = data.iniConf.getSections();\n\n      if ( data.realSection != null ) {\n        // just one section\n        data.iniSection = data.iniConf.getSection( data.realSection );\n        if ( data.iniSection == null ) {\n          throw new KettleException(\n            BaseMessages.getString( PKG, \"PropertyInput.Error.CanNotFindSection\", data.realSection,\n              \"\" + data.file.getName() ) );\n        }\n      } else {\n        // We need to fetch all sections\n        data.iniSectionIt = sections.iterator();\n        data.currentSection = data.iniSectionIt.next();\n        data.iniSection = data.iniConf.getSection( data.currentSection );\n      }\n      data.iniIt = data.iniSection.getKeys();\n    }\n  }\n\n  /**\n   * Build an empty row based on the meta-data...\n   *\n   * @return an empty row with the correct size\n   */","sourceCodeStart":455,"sourceCodeEnd":491,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/propertyinput/PropertyInput.java#L455-L491","documentation":"In loadIniFile(), PropertyInput throws this when the configured INI section (data.realSection) is not found in the parsed INI file — ini4j's getSection returns null. It means the expected section header is absent from the current file.","triggerScenarios":"The step's 'Section' value names a section that the current INI file does not contain (e.g. [database] missing), possibly due to an empty file, wrong section name, or the wrong file being processed.","commonSituations":"Typo or case mismatch in the section name; INI file variant per environment lacking the section; file truncated; step configured for a different file layout than the actual data.","solutions":["Verify the section name in the step dialog matches a header in the INI file exactly (case-sensitive)","Open the file at the message-reported path and confirm the section exists","Handle per-environment files by variable-izing the section name or generating complete files","Inspect the wrapped cause and data.file.getName() in the message to confirm which file failed"],"exampleFix":"// before: section missing in file\n// step section = \"databse\" (typo), file has [database]\nmeta.setSection(\"database\");\n// after: exact match with file\n// file content: [database]\\nurl=...\nmeta.setSection(\"database\");","handlingStrategy":"validation","validationCode":"org.ini4j.Ini ini = new org.ini4j.Ini(new File(iniPath));\nif (ini.getSection(sectionName) == null) {\n  throw new IllegalStateException(\"Section [\" + sectionName + \"] missing in \" + iniPath);\n}","typeGuard":null,"tryCatchPattern":"try {\n  transformation.execute(params);\n} catch (KettleException e) {\n  if (e.getMessage() != null && e.getMessage().contains(\"CanNotFindSection\")) {\n    logError(\"INI section missing: \" + e.getMessage());\n  } else { throw e; }\n}","preventionTips":["Keep section names in the step config exactly matching file headers (case-sensitive)","Template INI files so every environment variant contains the required sections","Validate INI files with a lightweight check job before the transformation runs","Use a variable for the section name when file layouts vary by environment"],"tags":["kettle","ini","file-parse"],"backgroundTag":"resource-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"}