{"record":{"id":"2497823f3df4d8be","repo":"pentaho/pentaho-kettle","slug":"missing-connection-configuration","errorCode":null,"errorMessage":"Missing connection configuration","messagePattern":"Missing connection configuration","errorType":"exception","errorClass":"IOException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/connections/vfs/provider/ConnectionFileSystem.java","lineNumber":200,"sourceCode":"    return KettleVFS.getInstance( getBowl() );\n  }\n\n  @NonNull\n  private VFSConnectionDetails getExistingConnectionDetails( @NonNull ConnectionManager manager, @NonNull String connectionName )\n    throws KettleVFSFileSystemException {\n    try {\n      return manager.getExistingDetails( connectionName );\n    } catch ( KettleException e ) {\n      throw new KettleVFSFileSystemException( \"ConnectionFileSystem.ExpectedConnectionNotFound\", connectionName, e );\n    }\n  }\n\n  @NonNull\n  private VariableSpace initializeVariableSpace( @NonNull VFSConnectionDetails details )\n    throws IOException {\n\n    if ( details == null || details.getName() == null ) {\n      throw new IOException( \"Missing connection configuration\" );\n    }\n\n    VariableSpace varSpace = getSpace();\n    if ( varSpace == null ) {\n      throw new IOException( \"Failed to initialize connection variables\" );\n    }\n\n    String connectionName = details.getName();\n\n    // Used by KettleVFSImpl#buildFsOptions -> VFSHelper#getOpts(...).\n    varSpace.setVariable( CONNECTION, connectionName );\n\n    details.setSpace( varSpace );\n\n    return varSpace;\n  }\n\n  @NonNull","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/connections/vfs/provider/ConnectionFileSystem.java#L182-L218","documentation":"initializeVariableSpace validates that the resolved VFSConnectionDetails and its name are non-null before initializing a variable space; otherwise it throws a plain IOException 'Missing connection configuration'. The connection metadata is required to seed variables used by provider file options.","triggerScenarios":"createFile or toPvfsFileName path resolves connection details to null (or a details object with a null name) and then calls initializeVariableSpace. Note the null check is defensive — getExistingConnectionDetails normally throws earlier if lookup fails.","commonSituations":"A connection registered with an empty/unset name; corrupted saved connection metadata; defensive guard hit after a partially-initialized connection object.","solutions":["Open the connection definition and set a valid non-empty name","Re-save/recreate the connection to repair corrupted metadata","Validate connection details (name present) before resolving pvfs files","Inspect the saved repository metadata for the connection object"],"exampleFix":"// before: connection saved without a name\nVFSConnectionDetails d = new S3VFSConnectionDetails(); // name never set\n// after\nd.setName(\"my-s3\");\nconnectionManager.addDetails(d);","handlingStrategy":"validation","validationCode":"boolean valid = details != null && details.getName() != null && !details.getName().isEmpty();","typeGuard":"boolean hasName = d instanceof VFSConnectionDetails v && v.getName() != null;","tryCatchPattern":"try { fo = fs.resolveFile(url); } catch (IOException e) { if (\"Missing connection configuration\".equals(e.getMessage())) { /* repair connection metadata */ } }","preventionTips":["Always set a non-empty name when creating connections programmatically","Re-save corrupted connection metadata","Validate connection definitions after import/migration"],"tags":["vfs","connection-config","validation","null"],"backgroundTag":"missing-required-config-field","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"}