{"record":{"id":"fca4a91fbf19bcbb","repo":"pentaho/pentaho-kettle","slug":"server-url-is-required","errorCode":null,"errorMessage":"Server URL is required","messagePattern":"Server URL is required","errorType":"validation","errorClass":"IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"plugins/repositories/core/src/main/java/org/pentaho/di/ui/repo/util/SsoProviderService.java","lineNumber":124,"sourceCode":"        }\n      } catch ( Exception e ) {\n        return false;\n      }\n      return false;\n    } finally {\n      if ( connection != null ) {\n        connection.disconnect();\n      }\n    }\n  }\n\n  public String buildProvidersUrl( String serverUrl ) {\n    return normalizeBaseUrl( serverUrl ) + \"/plugin/login/api/v0/oauth-providers\";\n  }\n\n  private String normalizeBaseUrl( String serverUrl ) {\n    if ( isBlank( serverUrl ) ) {\n      throw new IllegalArgumentException( \"Server URL is required\" );\n    }\n\n    String trimmed = serverUrl.trim();\n    return trimmed.endsWith( \"/\" ) ? trimmed.substring( 0, trimmed.length() - 1 ) : trimmed;\n  }\n\n  private boolean getBoolean( Object value ) {\n    if ( value instanceof Boolean booleanValue ) {\n      return booleanValue;\n    }\n    if ( value instanceof String stringValue ) {\n      return Boolean.parseBoolean( stringValue );\n    }\n    return false;\n  }\n\n  private String stringValue( Object value ) {\n    return value == null ? null : value.toString();","sourceCodeStart":106,"sourceCodeEnd":142,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/repositories/core/src/main/java/org/pentaho/di/ui/repo/util/SsoProviderService.java#L106-L142","documentation":"normalizeBaseUrl throws this IllegalArgumentException when the server URL passed to settingsUrl or buildProvidersUrl is null, empty, or whitespace-only. It is an upfront guard so URL construction never proceeds with a blank base.","triggerScenarios":"Calling buildProvidersUrl(serverUrl) or settingsUrl(...) with null, \"\", or a blank string as the server URL.","commonSituations":"Repository connection dialog where the user has not yet entered a server URL; SSO check triggered before the repository settings are loaded; programmatically constructed settings object missing the serverUrl field.","solutions":["Ensure the repository settings contain a non-blank server URL before calling the service","Validate/trim the URL in the UI before invoking the SSO lookup","Skip SSO detection when no server URL is configured (treat as non-SSO repository)","Fail fast with a user-facing 'enter server URL' message instead of the internal exception"],"exampleFix":"// before\nString url = ssoProviderService.buildProvidersUrl( settings.getServerUrl() );\n// after\nif ( settings.getServerUrl() == null || settings.getServerUrl().isBlank() ) {\n  return Collections.emptyList(); // SSO not applicable without a server URL\n}\nString url = ssoProviderService.buildProvidersUrl( settings.getServerUrl() );","handlingStrategy":"validation","validationCode":"if ( serverUrl == null || serverUrl.trim().isEmpty() ) {\n  throw new IllegalArgumentException( \"Server URL must be configured before SSO lookup\" );\n}","typeGuard":null,"tryCatchPattern":"try {\n  providers = ssoProviderService.fetchProviders( serverUrl );\n} catch ( IllegalArgumentException e ) {\n  log.debug( \"No server URL configured — skipping SSO detection\" );\n  providers = Collections.emptyList();\n}","preventionTips":["Check repository settings for a non-blank server URL before any SSO lookup","In UI code, disable the SSO path until the user enters a server URL","Trim and validate the URL once, early, and pass the normalized value onward","Treat missing URL as 'SSO not applicable' rather than an exceptional condition"],"tags":["validation","sso","url"],"backgroundTag":"missing-required-argument","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"}