{"record":{"id":"66397ce3840b860b","repo":"pentaho/pentaho-kettle","slug":"userinfo-error-usernotfound","errorCode":null,"errorMessage":"UserInfo.Error.UserNotFound","messagePattern":"UserInfo\\.Error\\.UserNotFound","errorType":"exception","errorClass":"KettleDatabaseException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryUserDelegate.java","lineNumber":66,"sourceCode":"      quoteTable( KettleDatabaseRepository.TABLE_R_USER ), quote( KettleDatabaseRepository.FIELD_USER_ID_USER ),\n      quote( KettleDatabaseRepository.FIELD_USER_LOGIN ), login );\n  }\n\n  // Load user with login from repository, don't verify password...\n  public IUser loadUserInfo( IUser userInfo, String login ) throws KettleException {\n    try {\n      userInfo.setObjectId( getUserID( login ) );\n      if ( userInfo.getObjectId() != null ) {\n        RowMetaAndData r = getUser( userInfo.getObjectId() );\n        if ( r != null ) {\n          userInfo.setLogin( r.getString( \"LOGIN\", null ) );\n          userInfo.setPassword( Encr.decryptPassword( r.getString( \"PASSWORD\", null ) ) );\n          userInfo.setUsername( r.getString( \"NAME\", null ) );\n          userInfo.setDescription( r.getString( \"DESCRIPTION\", null ) );\n          userInfo.setEnabled( r.getBoolean( \"ENABLED\", false ) );\n          return userInfo;\n        } else {\n          throw new KettleDatabaseException( BaseMessages.getString( PKG, \"UserInfo.Error.UserNotFound\", login ) );\n        }\n      } 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 {","sourceCodeStart":48,"sourceCodeEnd":84,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/kdr/delegates/KettleDatabaseRepositoryUserDelegate.java#L48-L84","documentation":"Thrown inside loadUserInfo() when no repository user row matches the supplied login: either the query returned no rows or the user row exists but is invalid, raising KettleDatabaseException with UserInfo.Error.UserNotFound. That exception is then caught and re-wrapped as UserInfo.Error.UserNotLoaded in a KettleException, so the user-facing message is UserNotLoaded with UserNotFound as the cause.","triggerScenarios":"Calling loadUserInfo(login) (or verifyLogin which calls it) with a login that has no row in R_USER, or where the row query returns no usable record.","commonSituations":"Typo in the username, authenticating against the wrong repository database, user deleted by an admin, or case-sensitivity mismatch in the login value.","solutions":["Verify the login exists: query R_USER for the NAME value","Check you are connected to the intended repository database/schema","Create the user via UserRepository/rep.getUserInfo or the repository user-management UI","Confirm the exact case and spelling of the login string"],"exampleFix":"// before\nUserInfo user = rep.loadUserInfo(\"adimn\"); // typo\n\n// after\nUserInfo user = rep.loadUserInfo(\"admin\"); // verify login in R_USER first\nif (user == null || !user.isEnabled()) {\n  throw new KettleException(\"User 'admin' missing or disabled in repository\");\n}","handlingStrategy":"validation","validationCode":"// Java: check the login exists before loadUserInfo\n// SELECT COUNT(*) FROM R_USER WHERE LOWER(NAME) = LOWER(?)\nboolean userExists = rep.getUserManager() != null\n    && Arrays.stream(rep.getUserManager().getUsers())\n        .anyMatch(u -> u.getLogin().equalsIgnoreCase(login));\nif (!userExists) throw new IllegalArgumentException(\"Unknown repository user: \" + login);","typeGuard":null,"tryCatchPattern":"try {\n  UserInfo user = rep.loadUserInfo(login);\n} catch (KettleException e) {\n  log.error(\"Repository user not found: \" + login, e);\n  throw new IllegalArgumentException(\"Unknown user: \" + login, e);\n}","preventionTips":["Validate logins against the user list before authentication","Normalize login case consistently (Kettle compares as stored)","Confirm which repository database you are connected to before user lookups","Provision users through the repository UI/API so R_USER stays consistent"],"tags":["repository","kettle","user","authentication"],"backgroundTag":"user-not-found","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"}