pentaho/pentaho-kettle · error · KettleException
PurRepositorySecurityManager.ERROR_0001_INVALID_NAME
PurRepositorySecurityManager.ERROR_0001_INVALID_NAME
Error message
PurRepositorySecurityManager.ERROR_0001_INVALID_NAME
What it means
saveUserInfo validates a user (name, etc.) after normalizing it and throws this KettleException with the ERROR_0001_INVALID_NAME message key when validateUserInfo fails. It is thrown before any call to the server-side createUser, so the user record is not persisted. The localized message indicates the supplied user data (typically name/username) is invalid.
Solutions
- Set a non-empty, valid login and name on the IUser before calling saveUserInfo.
- Trim and validate the username in your calling code (non-blank, allowed characters).
- Check validateUserInfo in PurRepositorySecurityManager for the exact rules being violated.
- If data comes from an external source, sanitize/normalize it (trim, strip illegal chars) before creating the user.
Example fix
// before
IUser user = securityManager.constructUser();
user.setName( inputName ); // may be null/empty
securityManager.saveUserInfo( user );
// after
IUser user = securityManager.constructUser();
String name = inputName == null ? "" : inputName.trim();
if ( name.isEmpty() ) {
throw new IllegalArgumentException( "User name is required" );
}
user.setName( name );
user.setLogin( name );
securityManager.saveUserInfo( user ); Defensive patterns
Strategy: validation
Validate before calling
boolean isUserValid( IUser u ) {
return u != null && u.getName() != null && !u.getName().trim().isEmpty()
&& u.getLogin() != null && !u.getLogin().trim().isEmpty();
} Prevention
- Always set both login and name before saveUserInfo
- Trim user input from external sources
- Unit-test user creation with empty/null names
- Run normalizeUserInfo semantics yourself before calling
When it happens
Trigger: Calling PurRepositorySecurityManager.saveUserInfo(IUser) with a user whose name/login is null, empty, or otherwise fails validateUserInfo after normalizeUserInfo runs.
Common situations: Creating users programmatically without setting login/name, importing user data from CSV/LDAP with blank usernames, or whitespace-only names that fail validation.
Understand the failure class
Background: "must not be empty", "cannot be empty" — required-field validation errors across open-source libraries — this error's family across 41 libraries.
Related errors
- ERROR_0014_INSUFFICIENT_PRIVILEGES
- JobExecutorDialog.Exception.NoValidMappingDetailsFound
- TransMeta.Exception.PlsSelectAValidDirectoryBeforeSavingTheTransformation
- A connection of type PALO is expected
- A connection of type PALO is expected
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/c0a5f8240183f6a3.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepositorySecurityManager.java:109
return user;
}
public IUser loadUserInfo( String login, String password ) throws KettleException {
// Create a UserInfo object
IUser user = constructUser();
user.setLogin( login );
user.setPassword( password );
user.setName( login );
return user;
}
public void renameUser( ObjectId id_user, String newname ) throws KettleException {
}
public void saveUserInfo( IUser user ) throws KettleException {
normalizeUserInfo( user );
if ( !validateUserInfo( user ) ) {
throw new KettleException( BaseMessages.getString( PurRepositorySecurityManager.class,
"PurRepositorySecurityManager.ERROR_0001_INVALID_NAME" ) );
}
userRoleDelegate.createUser( user );
}
@Override
public boolean validateUserInfo( IUser user ) {
return RepositoryCommonValidations.checkUserInfo( user );
}
@Override
public void normalizeUserInfo( IUser user ) {
RepositoryCommonValidations.normalizeUserInfo( user );
}
public void createRole( IRole newRole ) throws KettleException {
normalizeRoleInfo( newRole );
if ( !validateRoleInfo( newRole ) ) {View on GitHub (pinned to f3058517a1)