{"record":{"id":"273b65e95ff1b505","repo":"pentaho/pentaho-kettle","slug":"excelinput-exception-cannotcreatefileobject","errorCode":"ExcelInput.Exception.CanNotCreateFileObject","errorMessage":"ExcelInput.Exception.CanNotCreateFileObject","messagePattern":"ExcelInput\\.Exception\\.CanNotCreateFileObject","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ExcelInput.java","lineNumber":400,"sourceCode":"        Object[] fileRow = getRowFrom( rowSet );\n        while ( fileRow != null ) {\n          if ( idx < 0 ) {\n            idx = rowSet.getRowMeta().indexOfValue( meta.getAcceptingField() );\n            if ( idx < 0 ) {\n              logError( BaseMessages.getString( PKG, \"ExcelInput.Error.FilenameFieldNotFound\", \"\"\n                + meta.getAcceptingField() ) );\n\n              setErrors( 1 );\n              stopAll();\n              return false;\n            }\n          }\n          String fileValue = rowSet.getRowMeta().getString( fileRow, idx );\n          try {\n            data.files.addFile( KettleVFS.getInstance( getTransMeta().getBowl() )\n              .getFileObject( fileValue, getTransMeta() ) );\n          } catch ( KettleFileException e ) {\n            throw new KettleException( BaseMessages.getString(\n              PKG, \"ExcelInput.Exception.CanNotCreateFileObject\", fileValue ), e );\n          }\n\n          // Grab another row\n          fileRow = getRowFrom( rowSet );\n        }\n      }\n\n      handleMissingFiles();\n    }\n\n    // See if we're not done processing...\n    // We are done processing if the filenr >= number of files.\n    if ( data.filenr >= data.files.nrOfFiles() ) {\n      if ( log.isDetailed() ) {\n        logDetailed( BaseMessages.getString( PKG, \"ExcelInput.Log.NoMoreFiles\", \"\" + data.filenr ) );\n      }\n","sourceCodeStart":382,"sourceCodeEnd":418,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/excel/core/src/main/java/org/pentaho/di/trans/steps/excelinput/ExcelInput.java#L382-L418","documentation":"Thrown in processRow when KettleVFS cannot create a FileObject for a filename received on the file-row rowset. The KettleFileException is wrapped in a KettleException including the offending file value. It signals a VFS-level failure resolving the file path (bad URI scheme, invalid path, provider error).","triggerScenarios":"A row arriving on the 'file' input rowset contains a string that KettleVFS.getFileObject() cannot resolve into a FileObject (invalid VFS URI, unsupported scheme, resolver failure).","commonSituations":"Filenames with spaces or special characters that break VFS URI parsing; paths using a scheme no VFS provider is installed for; rows fed from a previous step containing malformed or empty file values.","solutions":["Correct the file value flowing into the step to be a valid absolute path or VFS URI","Test the exact string with a simple VFS open (e.g. in a 'Get file names' step) to see the resolver error","Ensure the filename has no characters illegal in a VFS URI and that the scheme (file:, s3:, etc.) is supported by installed VFS plugins"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"// Validate each filename before feeding it to the Excel Input 'file' rowset\nfor (String f : fileValues) {\n  if (f == null || f.trim().isEmpty()) throw new IllegalArgumentException(\"empty file value\");\n  FileObject fo = KettleVFS.getInstance(bowl).getFileObject(f, transMeta); // throws early if invalid\n}","typeGuard":null,"tryCatchPattern":"try {\n  data.files.addFile(KettleVFS.getInstance(bowl).getFileObject(fileValue, transMeta));\n} catch (KettleFileException e) {\n  logError(\"Unresolvable VFS path: \" + fileValue, e); // skip row or abort\n}","preventionTips":["Generate file lists with a 'Get file names' step rather than hand-built strings","Avoid raw strings with characters that break VFS URI parsing","Confirm required VFS plugins/schemes exist on the execution node"],"tags":["vfs","file","kettle"],"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"}