pentaho/pentaho-kettle · error · IllegalArgumentException
The configuration parameter does not match a valid scheme:
Error message
The configuration parameter does not match a valid scheme:
What it means
KettleGenericFileSystemConfigBuilder.extractScheme() throws this IllegalArgumentException when a configuration parameter name does not start with 'vfs.' followed by a scheme segment (e.g. 'vfs.sftp.xxx'). First branch: the parameter is null, shorter than 5 chars, or lacks the 'vfs.' prefix.
Solutions
- Prefix the parameter with the scheme, e.g. 'vfs.sftp.userDirIsRoot'
- Ensure the name is non-null and longer than 4 characters
- Log the full parameter name in the exception message at the call site to spot malformed keys
- Validate parameter names against the 'vfs.<scheme>.<name>' pattern before passing to the config builder
- Use constants or the config builder's own key constants instead of string concatenation
Example fix
// before configBuilder.setParameter( opts, "sftp.StrictHostKeyChecking", "no", "sftp" ); // after configBuilder.setParameter( opts, "vfs.sftp.StrictHostKeyChecking", "no", "sftp" );
Defensive patterns
Strategy: validation
Validate before calling
static boolean isValidVfsParam( String name ) {
return name != null && name.length() > 4 && name.startsWith( "vfs." )
&& name.indexOf( ".", 4 ) > 4 && name.indexOf( ".", 4 ) < name.length() - 1;
}
// call before: isValidVfsParam(paramName) Prevention
- Always build parameter names as "vfs." + scheme + "." + key
- Use key constants instead of hand-typed strings
- Unit-test config key construction
- Never pass user-supplied strings straight in as parameter names without a pattern check
When it happens
Trigger: Calling setParameter/getParameter (via scheme()) with a name like 'sftp.key', 'vfs', 'vfs.' or null instead of 'vfs.<scheme>.<param>'.
Common situations: Hand-built FileSystemOptions maps with malformed keys, typos dropping the 'vfs.' prefix, programmatic config builders concatenating names incorrectly.
Understand the failure class
Background: "Invalid ... format", "must be in format X", "does not look like a ..." — invalid argument format errors across CLI tools and libraries — this error's family across 17 libraries.
Related errors
- ConnectionFileSystem.ExpectedConnectionNotFound
- CustomVfsSettingsParser.Log.FailedToLoad
- FileSystemConfigBuilder could not parse parameter:
- Invalid repository type
- Only local files are supported at this time, file [
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/346df37c49764932.
Report an issue: GitHub.
Appendix: source
Thrown at core/src/main/java/org/pentaho/di/core/vfs/configuration/KettleGenericFileSystemConfigBuilder.java:92
}
/**
* Extract the scheme from a Kettle VFS configuration paramter (vfs.scheme.parameter)
*
* @param fullParameterName
* A VFS configuration parameter in the form of 'vfs.scheme.parameter'
*/
public static String extractScheme( String fullParameterName ) throws IllegalArgumentException {
String result = null;
// Verify that this is a Kettle VFS configuration parameter
if ( ( fullParameterName != null )
&& ( fullParameterName.length() > 4 ) && ( fullParameterName.startsWith( "vfs." ) ) ) {
int schemeEnd = fullParameterName.indexOf( ".", 4 );
if ( schemeEnd > 4 ) {
result = fullParameterName.substring( 4, schemeEnd );
} else {
throw new IllegalArgumentException( "The configuration parameter does not match a valid scheme: "
+ fullParameterName );
}
} else {
throw new IllegalArgumentException( "The configuration parameter does not match a valid scheme: "
+ fullParameterName );
}
return result;
}
protected KettleGenericFileSystemConfigBuilder() {
super();
}
@Override
protected Class<? extends FileSystem> getConfigClass() {
return FileSystem.class;
}View on GitHub (pinned to f3058517a1)