{"record":{"id":"2b1ddeba5295bf81","repo":"pentaho/pentaho-kettle","slug":"customvfssettingsparser-log-failedtoload","errorCode":"CustomVfsSettingsParser.Log.FailedToLoad","errorMessage":"CustomVfsSettingsParser.Log.FailedToLoad","messagePattern":"CustomVfsSettingsParser\\.Log\\.FailedToLoad","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/core/vfs/configuration/KettleFileSystemConfigBuilderFactory.java","lineNumber":66,"sourceCode":"    IKettleFileSystemConfigBuilder result = null;\n\n    // Attempt to load the Config Builder from a variable: vfs.config.parser = class\n    String parserClass = varSpace.getVariable( \"vfs.\" + scheme + \".config.parser\" );\n\n    if ( parserClass != null ) {\n      try {\n        Class<?> configBuilderClass =\n          KettleFileSystemConfigBuilderFactory.class.getClassLoader().loadClass( parserClass );\n        Method mGetInstance = configBuilderClass.getMethod( \"getInstance\" );\n        if ( ( mGetInstance != null )\n          && ( IKettleFileSystemConfigBuilder.class.isAssignableFrom( mGetInstance.getReturnType() ) ) ) {\n          result = (IKettleFileSystemConfigBuilder) mGetInstance.invoke( null );\n        } else {\n          result = (IKettleFileSystemConfigBuilder) configBuilderClass.newInstance();\n        }\n      } catch ( Exception e ) {\n        // Failed to load custom parser. Throw exception.\n        throw new IOException( BaseMessages.getString( PKG, \"CustomVfsSettingsParser.Log.FailedToLoad\" ) );\n      }\n    } else {\n      // No custom parser requested, load default\n      if ( scheme.equalsIgnoreCase( \"sftp\" ) ) {\n        result = KettleSftpFileSystemConfigBuilder.getInstance();\n      } else {\n        result = KettleGenericFileSystemConfigBuilder.getInstance();\n      }\n    }\n\n    return result;\n  }\n\n}\n","sourceCodeStart":48,"sourceCodeEnd":81,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/core/vfs/configuration/KettleFileSystemConfigBuilderFactory.java#L48-L81","documentation":"KettleFileSystemConfigBuilder.getConfigBuilder() throws this IOException when loading a custom VFS config builder class (named via CustomVfsSettings) fails — the class cannot be found, instantiated, or its getInstance() invocation fails. The message key 'CustomVfsSettingsParser.Log.FailedToLoad' is resolved from BaseMessages at runtime.","triggerScenarios":"A VFS scheme has a custom config builder configured, and Class.forName/newInstance/invoke of that builder throws during getConfigBuilder().","commonSituations":"Typo or wrong FQCN in custom VFS settings file, plugin JAR missing from classpath, builder class lacking a no-arg constructor or getInstance(), class cast failures after plugin refactor.","solutions":["Check the custom VFS settings file for the correct config-builder class name","Ensure the plugin JAR containing the builder is on the classpath (lib/plugins directory)","Verify the class implements IKettleFileSystemConfigBuilder and has a public no-arg constructor or static getInstance()","Temporarily remove the custom setting to fall back to the default builder and confirm the custom class is the culprit","Check the plugin's dependency versions match the Kettle/PDI version"],"exampleFix":null,"handlingStrategy":"fallback","validationCode":"String cls = settings.getConfigBuilderClass();\nif ( cls != null ) {\n  try {\n    Class.forName( cls );\n  } catch ( ClassNotFoundException e ) {\n    System.out.println( \"Custom builder missing from classpath: \" + cls );\n  }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Keep custom VFS settings class names exact and version-controlled","Ship builder classes in plugin JARs placed in the correct plugin dir","Ensure the builder implements IKettleFileSystemConfigBuilder with a no-arg constructor or getInstance()","Test plugin classpath after every PDI upgrade"],"tags":["vfs","configuration","reflection","classpath"],"backgroundTag":"class-not-found","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"}