{"record":{"id":"d3cf97a5ff804912","repo":"pentaho/pentaho-kettle","slug":"userinfo-error-incorrectpasswortlogin","errorCode":null,"errorMessage":"UserInfo.Error.IncorrectPasswortLogin","messagePattern":"UserInfo\\.Error\\.IncorrectPasswortLogin","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryUserDelegate.java","lineNumber":86,"sourceCode":"      } else {\n        throw new KettleDatabaseException( BaseMessages.getString( PKG, \"UserInfo.Error.UserNotFound\", login ) );\n      }\n    } catch ( KettleDatabaseException dbe ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"UserInfo.Error.UserNotLoaded\", login, \"\" ), dbe );\n    }\n  }\n\n  /**\n   * Load user with login from repository and verify the password...\n   *\n   * @param rep\n   * @param login\n   * @param passwd\n   * @throws KettleException\n   */\n  public IUser loadUserInfo( IUser userInfo, String login, String passwd ) throws KettleException {\n    if ( userInfo == null || login == null || login.length() <= 0 ) {\n      throw new KettleDatabaseException( BaseMessages.getString( PKG, \"UserInfo.Error.IncorrectPasswortLogin\" ) );\n    }\n\n    try {\n      loadUserInfo( userInfo, login );\n    } catch ( KettleException ke ) {\n      throw new KettleAuthException( BaseMessages.getString( PKG, \"UserInfo.Error.IncorrectPasswortLogin\" ) );\n    }\n    // Verify the password:\n    // decrypt password if needed and compare with the one\n    String userPass = Encr.decryptPasswordOptionallyEncrypted( passwd );\n\n    if ( userInfo.getObjectId() == null || !userInfo.getPassword().equals( userPass ) ) {\n      throw new KettleAuthException( BaseMessages.getString( PKG, \"UserInfo.Error.IncorrectPasswortLogin\" ) );\n    }\n    return userInfo;\n  }\n\n  public void saveUserInfo( IUser userInfo ) throws KettleException {","sourceCodeStart":68,"sourceCodeEnd":104,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryUserDelegate.java#L68-L104","documentation":"loadUserInfo() validates its inputs before touching the repository. If the IUser object or the login string is null/empty, it throws a KettleDatabaseException wrapping the localized message 'UserInfo.Error.IncorrectPasswortLogin'. It signals that the caller supplied insufficient arguments to even attempt a user lookup, not that authentication failed.","triggerScenarios":"Calling repository.userDelegate.loadUserInfo(userInfo, login, passwd) (or the repository-level convenience wrapper that delegates to it) with userInfo == null, login == null, or an empty login string.","commonSituations":"Reading user name/password from a properties file, environment variable, or job parameter that was never set; UI code passing a blank login field; refactoring that forgets to instantiate the IUser object before loading.","solutions":["Ensure the login string is non-null and non-empty before calling loadUserInfo","Instantiate a valid IUser (e.g. new UserInfo()) instead of passing null","Check where the login comes from (config, dialog, variable) and validate/fail fast if it is blank"],"exampleFix":"// before\nrepository.userDelegate.loadUserInfo(null, userField.getText(), passField.getText());\n// after\nString login = userField.getText();\nif (login == null || login.isEmpty()) { throw new KettleException(\"Login is required\"); }\nrepository.userDelegate.loadUserInfo(new UserInfo(), login, passField.getText());","handlingStrategy":"validation","validationCode":"if (userInfo == null) throw new IllegalArgumentException(\"userInfo is required\");\nif (login == null || login.trim().isEmpty()) throw new IllegalArgumentException(\"login is required\");","typeGuard":"boolean isBlank(String s) { return s == null || s.trim().isEmpty(); }","tryCatchPattern":"try { repo.userDelegate.loadUserInfo(user, login, pass); } catch (KettleDatabaseException e) { handleMissingArgs(e); }","preventionTips":["Validate all user-supplied inputs before calling repository APIs","Fail fast at configuration-load time when login variables are empty","Centralize IUser creation in a factory that never returns null"],"tags":["repository","authentication","input-validation","null-argument"],"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"}