pentaho/pentaho-kettle · error · KettleException
unknown element type [" + element.getClass().getName() + "]
Error message
unknown element type [" + element.getClass().getName() + "]
What it means
Thrown by the private isRenamed method of PurRepository when computing the expected filename for an element whose RepositoryObjectType has no extension mapping in the switch. Indicates the element type is unknown to the rename-detection logic.
Solutions
- Set a valid RepositoryObjectType on the element before saving
- Use only supported element types with PurRepository
- Upgrade the pur plugin to a version matching your element types
Example fix
// before
element.setRepositoryElementType(RepositoryObjectType.valueOf("MY_TYPE"));
repository.save(element, null, null, null);
// after
element.setRepositoryElementType(RepositoryObjectType.TRANSFORMATION);
repository.save(element, null, null, null); Defensive patterns
Strategy: type-guard
Validate before calling
RepositoryObjectType t = element.getRepositoryElementType();
if (t == null) throw new IllegalArgumentException("Element has no repository type"); Type guard
boolean hasKnownType(RepositoryElementInterface el) {
return el.getRepositoryElementType() != null;
} Try / catch
try {
repository.save(element, null, null, null);
} catch (KettleException e) {
if (e.getMessage().contains("unknown element type")) {
log.error("Set a valid RepositoryObjectType on " + element.getClass().getName(), e);
}
} Prevention
- Always set getRepositoryElementType() on custom elements
- Avoid valueOf on unknown type strings
- Keep pur plugin version in sync with PDI
When it happens
Trigger: Calling PurRepository.save() with an element whose type enum is not TRANSFORMATION, JOB, DATABASE, CLUSTER_SCHEMA, PARTITION_SCHEMA, etc., so isRenamed's default case throws.
Common situations: Programmatically constructed repository elements with missing/wrong repositoryElementType; new element types added in a PDI version not handled by this pur adapter.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- It's not possible to rename Class [" +…
- It's not possible to save Class [" +…
- A deadlock was detected between steps
- AbsSecurityManager.ERROR_0003_UNABLE_TO_ACCESS_ROLE_BINDING_WEBSVC
- AbsSecurityManager.ERROR_0004_UNABLE_TO_APPLY_LOGICAL_ROLES_TO_RUNTIME_ROLE
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/f6c7c7791bd90267.
Report an issue: GitHub.
Appendix: source
Thrown at plugins/pur/core/src/main/java/org/pentaho/di/repository/pur/PurRepository.java:2233
filename += RepositoryObjectType.TRANSFORMATION.getExtension();
break;
case JOB:
filename += RepositoryObjectType.JOB.getExtension();
break;
case DATABASE:
filename += RepositoryObjectType.DATABASE.getExtension();
break;
case SLAVE_SERVER:
filename += RepositoryObjectType.SLAVE_SERVER.getExtension();
break;
case CLUSTER_SCHEMA:
filename += RepositoryObjectType.CLUSTER_SCHEMA.getExtension();
break;
case PARTITION_SCHEMA:
filename += RepositoryObjectType.PARTITION_SCHEMA.getExtension();
break;
default:
throw new KettleException( "unknown element type [" + element.getClass().getName() + "]" );
}
if ( !file.getName().equals( checkAndSanitize( filename ) ) ) {
return true;
}
return false;
}
private void renameIfNecessary( final RepositoryElementInterface element, final RepositoryFile file )
throws KettleException {
if ( !isRenamed( element, file ) ) {
return;
}
// ObjectId id = element.getObjectId();
StringBuilder buf = new StringBuilder( file.getPath().length() );
buf.append( getParentPath( file.getPath() ) );
buf.append( RepositoryFile.SEPARATOR );
buf.append( checkAndSanitize( element.getName() ) );View on GitHub (pinned to f3058517a1)