pentaho/pentaho-kettle · error · KettleException
KettleDatabaseRepositorySecurityProvider.ERROR_0001_UNABLE_TO_CREATE_USER
KettleDatabaseRepositorySecurityProvider.ERROR_0001_UNABLE_TO_CREATE_USER
Error message
KettleDatabaseRepositorySecurityProvider.ERROR_0001_UNABLE_TO_CREATE_USER
What it means
KettleDatabaseRepositorySecurityProvider.saveUserInfo() throws a KettleException with the localized ERROR_0001_UNABLE_TO_CREATE_USER message when normalizeUserInfo() passes but validateUserInfo() returns false, i.e. the IUser data failed validation before any insert. Note the message key text is thrown, not a formatted user-facing description.
Solutions
- Populate all required IUser fields (login, password, etc.) before calling saveUserInfo().
- Call validateUserInfo() logic yourself (or replicate checks) and reject invalid users upstream.
- Use updateUser() instead when userInfo.getObjectId() != null (that path throws IllegalArgumentException).
- Check field lengths against R_USER column sizes to avoid validation failure.
Example fix
// before
IUser u = new User(); u.setName(null); u.setPassword("x");
security.saveUserInfo(u); // throws ERROR_0001
// after
IUser u = new User();
u.setName("jsmith"); u.setPassword("secret"); u.addProfile(...);
if (u.getLogin() != null && !u.getLogin().isEmpty()) {
security.saveUserInfo(u);
} Defensive patterns
Strategy: validation
Validate before calling
boolean canSave(IUser u) {
return u != null && u.getName() != null && !u.getName().isEmpty()
&& u.getPassword() != null && !u.getPassword().isEmpty();
}
if (!canSave(userInfo)) throw new IllegalArgumentException("invalid IUser"); Type guard
boolean isValidUser(IUser u) { return u != null && u.getName() != null && !u.getName().trim().isEmpty() && u.getPassword() != null; } Try / catch
try {
security.saveUserInfo(userInfo);
} catch (KettleException e) {
if (e.getMessage().contains("ERROR_0001_UNABLE_TO_CREATE_USER")) {
// user data failed validation; fix IUser fields
}
} Prevention
- Populate login and password before saveUserInfo().
- Use updateUser() when the user already has an ObjectId.
- Validate field lengths against R_USER columns.
- Validate imported users (LDAP/CSV) before provisioning.
When it happens
Trigger: Calling saveUserInfo(userInfo) with an IUser whose required fields are missing/invalid after normalization (e.g. null/empty login, password, or other mandated fields), or fields exceeding database column limits.
Common situations: Programmatic user provisioning via the Kettle security provider with incomplete IUser objects; importing users from LDAP/CSV where some accounts lack login or password; UIless scripts creating users with blank names.
Understand the failure class
Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.
Related errors
- DELETE_TRANSFORMATION : repository is read-only
- MODIFY_JOB : repository is read-only
- MODIFY_TRANSFORMATION : repository is read-only
- PermissionsController.ERROR_0001_UNABLE_TO_INITIAL_REPOSITORY_SERVICE
- AbortMeta.Exception.UnableToSaveStepInfoToRepository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f885ab9a3b728530.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/kdr/KettleDatabaseRepositorySecurityProvider.java:98
// UserInfo
public IUser loadUserInfo( String login ) throws KettleException {
return userDelegate.loadUserInfo( new UserInfo(), login );
}
/**
* This method creates new user after all validations have been done. For updating user's data please use {@linkplain
* #updateUser(IUser)}.
*
* @param userInfo user's info
* @throws KettleException
* @throws IllegalArgumentException if {@code userInfo.getObjectId() != null}
*/
public void saveUserInfo( IUser userInfo ) throws KettleException {
normalizeUserInfo( userInfo );
if ( !validateUserInfo( userInfo ) ) {
throw new KettleException( BaseMessages.getString( KettleDatabaseRepositorySecurityProvider.class,
"KettleDatabaseRepositorySecurityProvider.ERROR_0001_UNABLE_TO_CREATE_USER" ) );
}
if ( userInfo.getObjectId() != null ) {
// not a message for UI
throw new IllegalArgumentException( "Use updateUser() for updating" );
}
String userLogin = userInfo.getLogin();
ObjectId exactMatch = userDelegate.getUserID( userLogin );
if ( exactMatch != null ) {
// found the corresponding record in db, prohibit creation!
throw new KettleException( BaseMessages.getString( KettleDatabaseRepositorySecurityProvider.class,
"KettleDatabaseRepositorySecurityProvider.ERROR_0001_USER_NAME_ALREADY_EXISTS" ) );
}
userDelegate.saveUserInfo( userInfo );
}View on GitHub (pinned to f3058517a1)