{"record":{"id":"346df37c49764932","repo":"pentaho/pentaho-kettle","slug":"the-configuration-parameter-does-not-match-a-valid-scheme","errorCode":null,"errorMessage":"The configuration parameter does not match a valid scheme: ","messagePattern":"The configuration parameter does not match a valid scheme: ","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/vfs/configuration/KettleGenericFileSystemConfigBuilder.java","lineNumber":92,"sourceCode":"  }\n\n  /**\n   * Extract the scheme from a Kettle VFS configuration paramter (vfs.scheme.parameter)\n   *\n   * @param fullParameterName\n   *          A VFS configuration parameter in the form of 'vfs.scheme.parameter'\n   */\n  public static String extractScheme( String fullParameterName ) throws IllegalArgumentException {\n    String result = null;\n\n    // Verify that this is a Kettle VFS configuration parameter\n    if ( ( fullParameterName != null )\n      && ( fullParameterName.length() > 4 ) && ( fullParameterName.startsWith( \"vfs.\" ) ) ) {\n      int schemeEnd = fullParameterName.indexOf( \".\", 4 );\n      if ( schemeEnd > 4 ) {\n        result = fullParameterName.substring( 4, schemeEnd );\n      } else {\n        throw new IllegalArgumentException( \"The configuration parameter does not match a valid scheme: \"\n          + fullParameterName );\n      }\n    } else {\n      throw new IllegalArgumentException( \"The configuration parameter does not match a valid scheme: \"\n        + fullParameterName );\n    }\n\n    return result;\n  }\n\n  protected KettleGenericFileSystemConfigBuilder() {\n    super();\n  }\n\n  @Override\n  protected Class<? extends FileSystem> getConfigClass() {\n    return FileSystem.class;\n  }","sourceCodeStart":74,"sourceCodeEnd":110,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/vfs/configuration/KettleGenericFileSystemConfigBuilder.java#L74-L110","documentation":"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.","triggerScenarios":"Calling setParameter/getParameter (via scheme()) with a name like 'sftp.key', 'vfs', 'vfs.' or null instead of 'vfs.<scheme>.<param>'.","commonSituations":"Hand-built FileSystemOptions maps with malformed keys, typos dropping the 'vfs.' prefix, programmatic config builders concatenating names incorrectly.","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"],"exampleFix":"// before\nconfigBuilder.setParameter( opts, \"sftp.StrictHostKeyChecking\", \"no\", \"sftp\" );\n// after\nconfigBuilder.setParameter( opts, \"vfs.sftp.StrictHostKeyChecking\", \"no\", \"sftp\" );","handlingStrategy":"validation","validationCode":"static boolean isValidVfsParam( String name ) {\n  return name != null && name.length() > 4 && name.startsWith( \"vfs.\" )\n    && name.indexOf( \".\", 4 ) > 4 && name.indexOf( \".\", 4 ) < name.length() - 1;\n}\n// call before: isValidVfsParam(paramName)","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["vfs","configuration","argument-validation"],"backgroundTag":"invalid-argument-format","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"}