pentaho/pentaho-kettle · error · KettleException

ERROR_0005_UNABLE_TO_GET_USER

ERROR_0005_UNABLE_TO_GET_USER

Error message

UserRoleDelegate.ERROR_0005_UNABLE_TO_GET_USER

What it means

Thrown by the password-accepting getUser(String name, String password) overload when the user lookup or authentication fails. The delegate wraps any exception from userRoleWebService.getUser/getRolesForUser in a KettleException with ERROR_0005_UNABLE_TO_GET_USER. Note it also returns null silently when the user exists but name/password don't match — this error fires only on exceptions (server/transport failures, missing user causing remote errors).

Solutions

  1. Check the cause for the underlying server/transport error.
  2. Verify server connectivity and that the repository session is valid.
  3. Confirm the user exists before authenticating (getUsers()/User Console).

Example fix

// before
IUserInfo info = delegate.getUser("bob", "secret"); // throws on server failure
// after
IUserInfo info = null;
try {
  info = delegate.getUser("bob", "secret");
} catch (KettleException e) {
  logger.error("Lookup failed: " + e.getCause(), e);
}
if (info != null) { /* authenticated */ }
Defensive patterns

Strategy: try-catch

Try / catch

try {
  IUserInfo info = userRoleDelegate.getUser(name, password);
  if (info == null) { /* bad credentials */ }
} catch (KettleException e) {
  Throwable cause = e.getCause();
  log.error("Auth check failed: " + (cause != null ? cause.getLocalizedMessage() : "unknown"), e);
}

Prevention

When it happens

Trigger: Calling getUser(name, password) when the web service call throws: server unreachable, session invalid, or the user does not exist and the server errors instead of returning null.

Common situations: Authentication checks against a Pentaho repository with an unreachable server, wrong tenant, or a SOAP/HTTP failure; programmatic login validation in Spoon plugins.

Understand the failure class

Background: "User not found", "Invalid user", and "does not exist": what missing-user lookup errors mean across Rocket.Chat, LiteLLM, Phabricator, rustfs, and pnpm — this error's family across 10 libraries.

Related errors


AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13). Data as JSON: /api/errors/a2ec7a02edb4b888. Report an issue: GitHub.

Appendix: source

Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/UserRoleDelegate.java:267

          "UserRoleDelegate.ERROR_0004_UNABLE_TO_DELETE_USER", name ), e ); //$NON-NLS-1$
    }
  }

  public void setUsers( List<IUser> users ) throws KettleException {
    // TODO Figure out what to do here
  }

  public IUser getUser( String name, String password ) throws KettleException {
    ensureHasPermissions();

    IUser userInfo = null;
    try {
      ProxyPentahoUser user = userRoleWebService.getUser( name );
      if ( user != null && user.getName().equals( name ) && user.getPassword().equals( password ) ) {
        userInfo = UserRoleHelper.convertToUserInfo( user, userRoleWebService.getRolesForUser( user ), rsm );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,
          "UserRoleDelegate.ERROR_0005_UNABLE_TO_GET_USER", name ), e ); //$NON-NLS-1$
    }
    return userInfo;
  }

  public IUser getUser( String name ) throws KettleException {
    ensureHasPermissions();

    IUser userInfo = null;
    try {
      ProxyPentahoUser user = userRoleWebService.getUser( name );
      if ( user != null && user.getName().equals( name ) ) {
        userInfo = UserRoleHelper.convertToUserInfo( user, userRoleWebService.getRolesForUser( user ), rsm );
      }
    } catch ( Exception e ) {
      throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,
          "UserRoleDelegate.ERROR_0005_UNABLE_TO_GET_USER", name ), e ); //$NON-NLS-1$
    }

View on GitHub (pinned to f3058517a1)