pentaho/pentaho-kettle · error · KettleException
RepositoryExplorerDialog.Exception.NameCanNotBeEmpty
Error message
RepositoryExplorerDialog.Exception.NameCanNotBeEmpty
What it means
renameTransformation() validates that the new transformation name is non-empty before renaming it in the repository. If Utils.isEmpty(newname), it throws KettleException 'RepositoryExplorerDialog.Exception.NameCanNotBeEmpty'. The repository rejects renames to an empty string because object names are required keys.
Solutions
- Provide a non-empty new name in the rename dialog before confirming.
- Trim and validate the new name in code before calling renameTransformation.
- If the UI allows empty confirmation, guard the dialog's ok() handler to reject blank input.
Example fix
// before
explorer.renameTransformation( name, newNameInput, repdir );
// after
String trimmed = newNameInput == null ? "" : newNameInput.trim();
if ( !trimmed.isEmpty() ) {
explorer.renameTransformation( name, trimmed, repdir );
} Defensive patterns
Strategy: validation
Validate before calling
public static boolean isValidNewName( String name ) {
return name != null && !name.trim().isEmpty();
}
// before calling:
if ( !isValidNewName( newName ) ) { /* block rename */ } Try / catch
try {
explorer.renameTransformation( name, newName, repdir );
} catch ( KettleException e ) {
if ( e.getMessage().contains( "NameCanNotBeEmpty" ) ) {
showWarning( "Name cannot be empty" );
} else {
throw e;
}
} Prevention
- Trim user input in the rename dialog and reject blank submissions at OK.
- Pre-fill the dialog with the current name so users edit rather than delete.
- Apply the same non-empty check for all rename* helpers (transformation, job, user).
- Strip whitespace and disallow control characters in repository object names.
When it happens
Trigger: Invoking renameTransformation(name, newname, repdir) with newname == null or "" — typically from the explorer's rename dialog after the user clears the name field and confirms.
Common situations: User pastes whitespace-only text or deletes the default name in the rename dialog; scripted repository maintenance calls passing an empty new name.
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
- PurRepository.fileCannotBeSavedInRootDirectory
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- AccessInputMeta.Exception.ErrorReadingRepository
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AddSequenceMeta.Exception.UnableToSaveStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/13d111792e87eb33.
Report an issue: GitHub.
Appendix: source
Thrown at ui/src/main/java/org/pentaho/di/ui/repository/dialog/RepositoryExplorerDialog.java:1828
editor.grabHorizontal = true;
editor.grabVertical = true;
editor.minimumWidth = 50;
text.selectAll();
text.setFocus();
editor.layout();
editor.setEditor( text );
}
return retval;
}
public boolean renameTransformation( String name, String newname, RepositoryDirectoryInterface repdir ) {
boolean retval = false;
try {
if ( Utils.isEmpty( newname ) ) {
throw new KettleException( BaseMessages.getString(
PKG, "RepositoryExplorerDialog.Exception.NameCanNotBeEmpty" ) );
}
if ( !name.equals( newname ) ) {
ObjectId id = rep.getTransformationID( name, repdir );
if ( id != null ) {
// System.out.println("Renaming transformation ["+name+"] with ID = "+id);
String comment = BaseMessages.getString( REPOSITORY_PKG, "Repository.Rename", name, newname );
rep.renameTransformation( id, comment, repdir, newname );
retval = true;
}
} else {
MessageBox mb = new MessageBox( shell, SWT.ICON_ERROR | SWT.OK );
mb
.setMessage( BaseMessages.getString(
PKG, "RepositoryExplorerDialog.Trans.Rename.ErrorFinding.Message1" )
+ name + "]" + Const.CR
+ BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Rename.ErrorFinding.Message2" ) );
mb.setText( BaseMessages.getString( PKG, "RepositoryExplorerDialog.Trans.Rename.ErrorFinding.Title" ) );View on GitHub (pinned to f3058517a1)