{"record":{"id":"85d6309250109f72","repo":"pentaho/pentaho-kettle","slug":"vfs-provider-missing-double-slashes-error","errorCode":"vfs.provider/missing-double-slashes.error","errorMessage":"vfs.provider/missing-double-slashes.error","messagePattern":"vfs\\.provider/missing-double-slashes\\.error","errorType":"error_code","errorClass":"FileSystemException","httpStatus":null,"severity":"error","filePath":"core/src/main/java/org/pentaho/di/connections/vfs/provider/ConnectionFileNameParser.java","lineNumber":287,"sourceCode":"\n    // Examples: name = \"/\" | \"/Folder/Sub Folder/100%25\"\n\n    String path = name.toString();\n\n    return new ConnectionFileName( connectionName, path, fileType );\n  }\n\n  private void extractPvfsScheme( String uri, StringBuilder name ) throws FileSystemException {\n    // UriParser.extractScheme initializes `name` with the contents of uri, and only then extracts the scheme.\n    // Scheme may not be present, or invalid (e.g. drive letter), in which case null is returned.\n    if ( UriParser.extractScheme( SCHEMES, uri, name ) == null ) {\n      throw new FileSystemException( \"vfs.provider/invalid-scheme\" );\n    }\n\n    // Extract \"//\" (based on HostFileNameParser#parseUri(..))\n    // These two are not supported as \"\\\".\n    if ( name.length() < 2 || name.charAt( 0 ) != SEPARATOR_CHAR || name.charAt( 1 ) != SEPARATOR_CHAR ) {\n      throw new FileSystemException( \"vfs.provider/missing-double-slashes.error\", uri );\n    }\n\n    name.delete( 0, 2 );\n  }\n}\n","sourceCodeStart":269,"sourceCodeEnd":293,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/core/src/main/java/org/pentaho/di/connections/vfs/provider/ConnectionFileNameParser.java#L269-L293","documentation":"After extracting the scheme, extractPvfsScheme requires the remainder of the URI to start with '//' (the authority delimiter preceding the connection name), mirroring Commons VFS HostFileNameParser. Backslashes are not accepted. If the URI lacks the double slashes — e.g. 'pvfs:my-connection/folder' — a FileSystemException with message 'vfs.provider/missing-double-slashes.error' is thrown, parameterised with the offending URI.","triggerScenarios":"Parsing 'pvfs:my-connection/path' (single colon, no '//'), 'pvfs:/one-slash/path', or any URI using backslashes ('pvfs:\\\\conn') instead of forward slashes after the scheme.","commonSituations":"Hand-written URIs missing the authority part; string building with 'pvfs:' + name; Windows-style paths pasted with backslash separators into connection settings.","solutions":["Format the URI as scheme + '//' + connectionName + path: 'pvfs://my-connection/folder'.","Replace backslashes with forward slashes before parsing (UriParser.fixSeparators or manual replace).","Validate the URI contains '://' before calling parseUri.","Normalize single leading slash after the scheme to a double slash in configuration cleanup code."],"exampleFix":"// before\nString uri = \"pvfs:my-connection/folder\";\nparser.parseUri( uri ); // throws missing-double-slashes\n// after\nString uri = \"pvfs://my-connection/folder\";\nparser.parseUri( uri ); // ok","handlingStrategy":"validation","validationCode":"String normalized = uri.replace( '\\\\', '/' );\nint i = normalized.indexOf( ':' );\nif ( i >= 0 && !normalized.startsWith( \"//\", i + 1 ) ) {\n  normalized = normalized.substring( 0, i + 1 ) + \"/\" + normalized.substring( i + 1 );\n}","typeGuard":"boolean hasDoubleSlash( String uri ) {\n  int i = uri.indexOf( ':' );\n  return i >= 0 && uri.startsWith( \"//\", i + 1 );\n}","tryCatchPattern":"try {\n  return parser.parseUri( uri );\n} catch ( FileSystemException e ) {\n  if ( String.valueOf( e.getMessage() ).startsWith( \"vfs.provider/missing-double-slashes\" ) ) {\n    // normalize separators / add '//' and retry\n  }\n  throw e;\n}","preventionTips":["Always build URIs as scheme://connection/path, never scheme:name/path","Replace backslashes with forward slashes before parsing","Normalize single-slash authorities at configuration boundaries"],"tags":["vfs","uri-parsing","malformed-uri"],"backgroundTag":"invalid-url-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"}