{"record":{"id":"5e2075f0f22f4292","repo":"pentaho/pentaho-kettle","slug":"e-no-own-message-error-opening-csv-file","errorCode":null,"errorMessage":"e (no own message; error opening CSV file)","messagePattern":"e \\(no own message; error opening CSV file\\)","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/trans/steps/csvinput/CsvInput.java","lineNumber":418,"sourceCode":"          logBasic( BaseMessages.getString( PKG, \"CsvInput.Log.HeaderRowSkipped\", data.filenames[ data.filenr - 1 ] ) );\n          if ( data.fieldsMapping.size() == 0 ) {\n            return false;\n          }\n        }\n      }\n      // Reset the row number pointer...\n      //\n      data.rowNumber = 1L;\n\n      // Don't skip again in the next file...\n      //\n      data.bytesToSkipInFirstFile = -1L;\n\n      return true;\n    } catch ( KettleException e ) {\n      throw e;\n    } catch ( Exception e ) {\n      throw new KettleException( e );\n    }\n  }\n\n  protected int getBOMSize( String vfsFilename ) throws Exception {\n    int bomSize = 0;\n    try ( FileInputStream fis = new FileInputStream( vfsFilename );\n          BufferedInputStream bis = new BufferedInputStream( fis ) ) {\n      BOMDetector bom = new BOMDetector( bis );\n\n      if ( bom.bomExist() ) {\n        bomSize = bom.getBomSize();\n      }\n    }\n\n    return bomSize;\n  }\n\n  FieldsMapping createFieldMapping( String fileName, CsvInputMeta csvInputMeta )","sourceCodeStart":400,"sourceCodeEnd":436,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/trans/steps/csvinput/CsvInput.java#L400-L436","documentation":"openNextFile wraps its work (VFS lookup, file opening, NIO channel setup, BOM detection) in a try/catch. KettleExceptions are rethrown unchanged, but any other Exception (IOException from FileObject resolution, file disappearance, permission errors, etc.) is wrapped in a new KettleException with no added message, so the original cause is preserved only as the cause chain.","triggerScenarios":"Any non-Kettle exception during openNextFile: VFS cannot resolve the filename, the file was deleted between listing and opening, wrong credentials for a VFS provider, or an I/O error while opening the file channel.","commonSituations":"Race condition where a file listed by a previous step no longer exists; malformed file URL; OS-level permission problems; VFS provider misconfiguration (e.g. bad SFTP credentials).","solutions":["Inspect the 'cause' of the KettleException in the stack trace to identify the underlying IOException or VFS error.","Verify the file exists and is readable at the configured path before/while the transformation runs.","Check VFS connection settings (credentials, host, scheme) if the filename is a remote URL.","Re-run the transformation; if it is a transient race with file deletion, regenerate the file list just before reading."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"// pre-flight check before running the transformation\nif (!java.nio.file.Files.isReadable(java.nio.file.Paths.get(filename))) {\n  throw new IllegalStateException(\"File missing or unreadable: \" + filename);\n}","typeGuard":null,"tryCatchPattern":"try { ... } catch (KettleException e) {\n  Throwable cause = e.getCause();\n  logError(\"Failed opening CSV file: \" + (cause != null ? cause.toString() : e.getMessage()), e);\n  setErrors(1);\n}","preventionTips":["Always read the cause chain — the wrapper carries no message","Regenerate file lists immediately before reading to avoid races","Verify VFS credentials/scheme for non-local URLs","Ensure files are not deleted between listing and reading"],"tags":["kettle","pentaho","io-exception","file-open"],"backgroundTag":"file-open-failed","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"}