pentaho/pentaho-kettle · error · FileSystemException
vfs.provider/create-folder-not-supported.error
vfs.provider/create-folder-not-supported.error
Error message
vfs.provider/create-folder-not-supported.error
What it means
Thrown by S3CommonFileObject.doCreateFolder() when the file object is not a folder-capable type (the 'isFolderCreatable' style condition fails), so no S3 folder marker can be written. It indicates the requested folder-creation operation is not supported for this object.
Solutions
- Create parent prefixes first, one level at a time, before creating the deepest folder
- Check the condition guarding doCreateFolder to see why the object was deemed non-folder-creatable
- Write files under the desired prefix instead — S3 implicitly treats prefixes as folders
- Avoid using a generic VFS createFolder on S3 objects that represent existing files
Example fix
// before FileObject folder = fsManager.resolveFile( "s3://bucket/a/b/c/" ); folder.createFolder(); // after FileObject parent = fsManager.resolveFile( "s3://bucket/a/" ); parent.createFolder(); fsManager.resolveFile( "s3://bucket/a/b/" ).createFolder(); fsManager.resolveFile( "s3://bucket/a/b/c/" ).createFolder();
Defensive patterns
Strategy: validation
Validate before calling
// create parent levels first, then leaf
FileObject parent = fsManager.resolveFile( "s3://bucket/some/existing/" );
if ( !parent.exists() ) {
throw new IllegalStateException( "parent prefix must exist: " + parent.getName().getURI() );
} Try / catch
try {
folder.createFolder();
} catch ( FileSystemException e ) {
if ( "vfs.provider/create-folder-not-supported.error".equals( e.getMessage() ) ) {
// fall back to writing a marker object or creating parents individually
}
throw e;
} Prevention
- Create parent prefixes level by level before creating nested folders
- Never call createFolder() on an object that resolves to an existing file key
- Check the VFS scheme supports folder semantics before using generic createFolder
- Rely on implicit S3 prefix semantics when deep nesting is needed
When it happens
Trigger: Calling createFolder() on an S3 VFS object whose type/scheme does not permit creating the zero-byte '/'-suffixed marker object (e.g. creating nested folders under a non-existent parent path, or a non-s3 file object).
Common situations: Trying to create deeply nested folders where parent prefixes don't exist; calling folder creation on a file-type S3 object; using the VFS manager on a scheme where folder creation isn't implemented.
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
- vfs.provider.local/create-folder.error
- Append file in repository is not possible
- Cannot add converters
- ConnectionFileObject.ConnectionWithBucketsRoot.UnsupportedOperation
- ConnectionFileObject.PVFSRoot.UnsupportedOperation
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/3a5d7b32c55da9c9.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/s3-vfs/core/src/main/java/org/pentaho/s3common/S3CommonFileObject.java:513
// create meta-data for your folder and set content-length to 0
ObjectMetadata metadata = new ObjectMetadata();
metadata.setContentLength( 0 );
metadata.setContentType( "binary/octet-stream" );
// create empty content
InputStream emptyContent = new ByteArrayInputStream( new byte[ 0 ] );
// create a PutObjectRequest passing the folder name suffixed by /
PutObjectRequest putObjectRequest = createPutObjectRequest( bucketName, key + DELIMITER, emptyContent, metadata );
// send request to S3 to create folder
try {
fileSystem.getS3Client().putObject( putObjectRequest );
} catch ( AmazonS3Exception e ) {
throw new FileSystemException( "vfs.provider.local/create-folder.error", this, e );
}
} else {
throw new FileSystemException( "vfs.provider/create-folder-not-supported.error" );
}
}
protected PutObjectRequest createPutObjectRequest( String bucketName, String key, InputStream inputStream,
ObjectMetadata objectMetadata ) {
return new PutObjectRequest( bucketName, key, inputStream, objectMetadata );
}
@Override
protected void doRename( FileObject newFile ) throws Exception {
// no folder renames on S3
if ( getType().equals( FileType.FOLDER ) ) {
logger.debug( "recursively moving folder [{}] -> [{}]", this.getPublicURIString(), newFile.getPublicURIString() );
doFolderMove( this, newFile );
return;
}
View on GitHub (pinned to f3058517a1)