pentaho/pentaho-kettle · error · FileSystemException

vfs.provider/mismatched-fs-for-name.error

vfs.provider/mismatched-fs-for-name.error

Error message

vfs.provider/mismatched-fs-for-name.error

What it means

GoogleDriveFileSystem.processFile() guards its VFS layer: a FileName is only resolvable inside the file system whose root URI matches. When the requested name's root URI differs from this file system's root URI, it throws vfs.provider/mismatched-fs-for-name.error with the name, the expected root, and the actual root.

Solutions

  1. Ensure the FileName's root URI exactly matches the root URI of the GoogleDriveFileSystem (same scheme, host, and path).
  2. Resolve the file through the correct VFS provider/manager instead of forcing it through the Google Drive file system.
  3. Use the same URI scheme string consistently in configuration and code (e.g. always 'googledrive://').

Example fix

// before
FileObject f = fs.resolveFile(VFS.getManager().resolveURI("file:///tmp/x.txt")); // foreign root
// after
FileObject f = VFS.getManager().resolveFile("googledrive://mydrive/path/to/file");
Defensive patterns

Strategy: validation

Validate before calling

URI root = fs.getRoot().getName().getURI();
URI nameRoot = name.getRootURI();
if (!root.equals(nameRoot)) { /* resolve through the matching file system instead */ }

Try / catch

try {
  FileObject f = fs.resolveFile(name);
} catch (FileSystemException e) {
  if (e.getMessage().startsWith("vfs.provider/mismatched-fs-for-name")) {
    // resolve via VFS manager with the correct provider/scheme
  } else { throw e; }
}

Prevention

When it happens

Trigger: Calling resolveFile(name) (e.g. from VFS.getManager().resolveFile or a nested scheme resolution) with a FileName whose root URI (scheme/authority) does not match the Google Drive file system's root, e.g. mixing 'gd:/...' and 'googledrive://...' URIs or passing a file from another provider.

Common situations: Composing paths across VFS providers (e.g. resolving 'file:///...' through the Google Drive provider); URIs spelled differently between configuration and code; cached file system reused for a differently-rooted name.

Understand the failure class

Background: "Invalid URL" / "URL cannot be empty": fix the malformed or missing URL behind request-construction failures — this error's family across 50 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/29b0626a0670ef30. Report an issue: GitHub.

Appendix: source

Thrown at plugins/pentaho-googledrive-vfs/core/src/main/java/org/pentaho/googledrive/vfs/GoogleDriveFileSystem.java:53

  protected FileObject createFile( AbstractFileName abstractFileName ) throws Exception {
    return new GoogleDriveFileObject( abstractFileName, this );
  }

  public void addCapabilities( Collection<Capability> caps ) {
    caps.addAll( GoogleDriveFileProvider.capabilities );
  }

  protected void clearFileFromCache( FileName name ) {
    super.removeFileFromCache( name );
  }

  public FileObject resolveFile( FileName name ) throws FileSystemException {
    return this.processFile( name, true );
  }

  private synchronized FileObject processFile( FileName name, boolean useCache ) throws FileSystemException {
    if ( !super.getRootName().getRootURI().equals( name.getRootURI() ) ) {
      throw new FileSystemException( "vfs.provider/mismatched-fs-for-name.error",
          new Object[] { name, super.getRootName(), name.getRootURI() } );
    } else {
      FileObject file;
      if ( useCache ) {
        file = super.getFileFromCache( name );
      } else {
        file = null;
      }

      if ( file == null ) {
        try {
          file = this.createFile( (AbstractFileName) name );
        } catch ( Exception var5 ) {
          return null;
        }

        file = super.decorateFileObject( file );
        if ( useCache ) {

View on GitHub (pinned to f3058517a1)