{"record":{"id":"0547380533e6e873","repo":"pentaho/pentaho-kettle","slug":"wrong-url","errorCode":"WRONG_URL","errorMessage":"WRONG_URL","messagePattern":"WRONG_URL","errorType":"error_code","errorClass":"FileSystemException","httpStatus":null,"severity":"error","filePath":"plugins/pentaho-repository-vfs/core/src/main/java/org/pentaho/repositoryvfs/vfs/RepositoryVfsProvider.java","lineNumber":74,"sourceCode":"        throw new RuntimeException( \"Error initialize repo:// VFS\", ex );\n      }\n    }\n  }\n\n  protected Repository getRepo() {\n    Repository repo = repositoryInstance.getConnectedRepositoryInstance();\n    if ( repo == null ) {\n      throw new RuntimeException( \"Repository not connected\" );\n    }\n    return repo;\n  }\n\n  @Override\n  public FileObject findFile( FileObject baseFile, String uri, FileSystemOptions fileSystemOptions )\n    throws FileSystemException {\n\n    if ( !uri.startsWith( \"repo://\" ) ) {\n      throw new FileSystemException( \"WRONG_URL\" );\n    }\n    String path = '/' + uri.substring( 7 );\n    return new RepositoryVfsFileObject( this, path );\n  }\n\n  @Override\n  public FileObject createFileSystem( String scheme, FileObject file, FileSystemOptions fileSystemOptions )\n    throws FileSystemException {\n    throw new NotImplementedException();\n  }\n\n  @Override\n  public FileSystemConfigBuilder getConfigBuilder() {\n    throw new NotImplementedException();\n  }\n\n  @Override\n  public Collection<Capability> getCapabilities() {","sourceCodeStart":56,"sourceCodeEnd":92,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/pentaho-repository-vfs/core/src/main/java/org/pentaho/repositoryvfs/vfs/RepositoryVfsProvider.java#L56-L92","documentation":"RepositoryVfsProvider.findFile only accepts URIs beginning with the 'repo://' scheme; any other URI passed to this provider throws FileSystemException('WRONG_URL'). This is a defensive guard since commons-vfs should route only repo:// URIs here.","triggerScenarios":"findFile being invoked with a URI that does not start with 'repo://' — e.g. resolving 'repo:/...' (single slash, substring(7) mismatch aside, the prefix check fails), 'Repo://...' with different case, or a misrouted scheme.","commonSituations":"Typo in URI scheme (rep://, repos://, repo:/ with one slash), uppercase/lowercase scheme mismatch, or a custom VFS manager configuration that routes non-repo URIs to this provider.","solutions":["Use the exact scheme prefix 'repo://' followed by the repository path (e.g. repo:///home/admin/file).","Normalize scheme case and format before resolveFile.","Check the VFS manager's provider mapping — other schemes should not be routed to RepositoryVfsProvider.","Log the offending URI and fix the source of the malformed URL."],"exampleFix":"// before\nFileObject fo = fsManager.resolveFile(\"repo:/home/admin/report.prpt\"); // WRONG_URL\n// after\nString uri = \"repo:///home/admin/report.prpt\";\nif (!uri.startsWith(\"repo://\")) throw new IllegalArgumentException(\"must use repo:// scheme: \" + uri);\nFileObject fo = fsManager.resolveFile(uri);","handlingStrategy":"validation","validationCode":"if (uri == null || !uri.startsWith(\"repo://\")) {\n  throw new IllegalArgumentException(\"Repository VFS URIs must start with 'repo://': \" + uri);\n}","typeGuard":null,"tryCatchPattern":"try {\n  FileObject fo = VFS.getManager().resolveFile(uri);\n} catch (FileSystemException e) {\n  if (\"WRONG_URL\".equals(e.getMessage())) {\n    throw new IllegalArgumentException(\"Invalid repo:// URL: \" + uri, e);\n  }\n  throw e;\n}","preventionTips":["Always build repo URIs with the exact lowercase 'repo://' prefix plus an absolute path.","Centralize repo URI construction in one helper to avoid scheme typos.","Validate URIs (prefix check) before resolveFile."],"tags":["vfs","url","repository"],"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"}