pentaho/pentaho-kettle · error · KettleVFSFileSystemException

ConnectionFileObject.ConnectionWithBucketsRoot.UnsupportedOperation

ConnectionFileObject.ConnectionWithBucketsRoot.UnsupportedOperation

Error message

ConnectionFileObject.ConnectionWithBucketsRoot.UnsupportedOperation

What it means

ConnectionWithBucketsRootFileObject represents the virtual root of a bucketed connection (e.g. S3 buckets). Its requireResolvedFileObject() override always throws KettleVFSFileSystemException with the connection name, because the root has no single resolved underlying file — callers must descend into a bucket first.

Solutions

  1. Resolve a specific bucket child (pvfs://myS3Conn/my-bucket/...) before performing file operations
  2. Check getType() / connection capabilities before calling operations on the root
  3. Skip bucket-root objects in generic file walkers that need resolved files
  4. List the root's children to discover valid bucket names

Example fix

// before: operating on the root
FileObject root = fs.resolveFile("pvfs://s3conn");
root.getContent(); // throws
// after
FileObject bucket = fs.resolveFile("pvfs://s3conn/my-bucket/");
bucket.getContent();
Defensive patterns

Strategy: type-guard

Validate before calling

FileObject target = name.endsWith("/") || connRoot.equals(name) ? fo.resolveFile(bucketName + "/") : fo;

Type guard

boolean isBucketsRoot = fo instanceof ConnectionWithBucketsRootFileObject;

Try / catch

try { op(fo); } catch (FileSystemException e) { if (causeCode == UnsupportedOperation && isRoot(fo)) { fo = fo.resolveFile("my-bucket/"); op(fo); } }

Prevention

When it happens

Trigger: Calling any operation that requires the concrete resolved file object directly on the connection-with-buckets root — e.g. reading/writing content, getting attributes on the root instead of a bucket child.

Common situations: Treating pvfs://myS3Conn (root) as if it were a readable folder/file; generic code that calls content APIs on every FileObject in a tree without skipping virtual roots.

Understand the failure class

Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.

Related errors


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

Appendix: source

Thrown at core/src/main/java/org/pentaho/di/connections/vfs/provider/ConnectionWithBucketsRootFileObject.java:45

/**
 * This class represents a file object for the connection root of an existing VFS connection which is using buckets,
 * as determined per {@link VFSConnectionManagerHelper#usesBuckets(VFSConnectionDetails)}.
 */
class ConnectionWithBucketsRootFileObject extends ConnectionFileObject {
  public ConnectionWithBucketsRootFileObject( @NonNull ConnectionFileName name, @NonNull ConnectionFileSystem fs ) {
    super( name, fs );
  }

  @Override
  @Nullable
  public FileObject getResolvedFileObject() {
    return null;
  }

  @Override
  @NonNull
  protected AbstractFileObject<?> requireResolvedFileObject() throws FileSystemException {
    throw new KettleVFSFileSystemException(
      "ConnectionFileObject.ConnectionWithBucketsRoot.UnsupportedOperation",
      getName().getConnection() );
  }

  @Override
  public FileType getType() throws FileSystemException {
    return FileType.FOLDER;
  }

  @Override
  public boolean isAttached() {
    return true;
  }

  @Override
  public boolean isExecutable() throws FileSystemException {
    return false;
  }

View on GitHub (pinned to f3058517a1)