pentaho/pentaho-kettle · error · KettleException
ERROR_0013_UNABLE_TO_DELETE_ROLE
ERROR_0013_UNABLE_TO_DELETE_ROLE
Error message
UserRoleDelegate.ERROR_0013_UNABLE_TO_DELETE_ROLE
What it means
Second throw site of UserRoleDelegate.deleteRole(): thrown when the role exists (roleToDelete found) but the deleteRoles web-service call fails. The original lookup-miss throw at line 447 and this wrap share the same message key ERROR_0013_UNABLE_TO_DELETE_ROLE with the role name as parameter.
Solutions
- Inspect the cause for the web-service error
- Re-list roles to confirm the role still exists on the server
- Verify admin permissions for the connected user
- Reconnect if the session expired
- Check server logs for refusal reasons (system role, last admin role)
Example fix
// before
roleDelegate.deleteRole( "Analyst" );
// after
try {
roleDelegate.deleteRole( "Analyst" );
} catch ( KettleException e ) {
logError( "Delete failed", e );
} Defensive patterns
Strategy: try-catch
Validate before calling
IRole toDelete = delegate.findRole( name ); // non-null before deleting
Try / catch
try { delegate.deleteRole( name ); } catch ( KettleException e ) { if ( e.getCause() != null ) logError( "Server refused delete", e.getCause() ); } Prevention
- Refresh role lists immediately before delete to reduce race windows
- Check server logs when deletes are refused
- Use an admin account
When it happens
Trigger: Role was found locally, but userRoleWebService.deleteRoles throws — server-side delete refused (permissions, session expired, concurrent deletion, network failure).
Common situations: Another admin deleted the role between lookup and delete; non-admin user; server connection dropped; server refuses to delete a system/last-admin role.
Understand the failure class
Background: "API request failed": what wrapped HTTP errors from external APIs mean and how to find the real cause — this error's family across 29 libraries.
Related errors
- ERROR_0012_UNABLE_TO_UPDATE_ROLE
- AbsSecurityManager.ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC
- AbsSecurityManager.ERROR_0005_INSUFFICIENT_PRIVELEGES
- ERROR_0002_UNABLE_TO_GET_LOGICAL_ROLES
- PurRepository.FailedLogin.Message
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/b62fe5ecb320d174.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/UserRoleDelegate.java:447
fireUserRoleListChange();
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,
"UserRoleDelegate.ERROR_0012_UNABLE_TO_UPDATE_ROLE", role.getName() ), e ); //$NON-NLS-1$
}
}
public void deleteRole( String name ) throws KettleException {
ensureHasPermissions();
try {
ProxyPentahoRole roleToDelete = UserRoleHelper.getProxyPentahoRole( userRoleWebService, name );
if ( roleToDelete != null ) {
ProxyPentahoRole[] roleArray = new ProxyPentahoRole[1];
roleArray[0] = roleToDelete;
userRoleWebService.deleteRoles( roleArray );
fireUserRoleListChange();
} else {
throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,
"UserRoleDelegate.ERROR_0013_UNABLE_TO_DELETE_ROLE", name ) ); //$NON-NLS-1$
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString( UserRoleDelegate.class,
"UserRoleDelegate.ERROR_0013_UNABLE_TO_DELETE_ROLE", name ), e ); //$NON-NLS-1$
}
}
public void setRoles( List<IRole> roles ) throws KettleException {
// TODO Figure out what to do here
}
public void addUserRoleListChangeListener( IUserRoleListChangeListener listener ) {
if ( userRoleListChangeListeners == null ) {
userRoleListChangeListeners = new UserRoleListChangeListenerCollection();
}
userRoleListChangeListeners.add( listener );
}View on GitHub (pinned to f3058517a1)