pentaho/pentaho-kettle · error · KettleException
ValidationFailed.Message (validation failure details for…
Error message
ValidationFailed.Message (validation failure details for subject, one per line)
What it means
RepositoryImporter.validateImportedElement aggregates all ImportValidationFeedback errors for an imported element into a multi-line message and throws this KettleException when validation rules fail. It is the importer's gate that rejects transformations/jobs/databases that do not conform to the configured import rules (name conflicts, missing dependencies, rule violations).
Solutions
- Read the per-line feedback in the message — each '- ' line is one concrete validation failure; fix the first listed issue and re-run.
- Adjust the import rules (ImportRuleSet) passed to the importer to permit the conflicting element, or enable the overwrite/rename option.
- Rename or delete conflicting elements in the target repository before importing.
- Set a validation listener / RulesController to skip failed elements instead of aborting the whole import.
Example fix
// before: import fails on any validation rule violation
importer.validateImportedElement(transMeta, directory);
// after: pre-check name conflicts and rename before import
if (rep.exists(transMeta.getName(), directory)) {
transMeta.setName(transMeta.getName() + "-imported");
}
importer.validateImportedElement(transMeta, directory); Defensive patterns
Strategy: validation
Validate before calling
// pre-check name conflicts in target folder boolean conflicts = rep.exists(element.getName(), directory);
Try / catch
try {
importer.validateImportedElement(element, directory);
} catch (KettleException e) {
// message has one ' - ' line per failed rule
List<String> failures = Arrays.stream(e.getMessage().split("\n"))
.filter(l -> l.startsWith(" - ")).collect(Collectors.toList());
log.error("Validation failures: " + failures);
} Prevention
- Review the configured ImportRuleSet before bulk imports
- Pre-check for name collisions in the target directory and rename ahead
- Treat each ' - ' feedback line as a separate fixable issue
- Run a dry-run import into a test repository first
When it happens
Trigger: Calling loadSharedObjects, importTransformation, or importJob when an imported element violates an active ImportRuleInterface rule set — e.g. no rules executed errors, element name already exists in target folder, or a validation rule like 'transformation must have a description' fails.
Common situations: Bulk import where target repository already contains elements with the same names; importing shared objects (connections, etc.) that conflict with existing ones; importing without the validation rule set the original export assumed.
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
- AbsSecurityProvider.ERROR_0002_UNABLE_TO_ACCESS_IS_ALLOWED
- AccessInputMeta.Exception.ErrorReadingRepository
- AddSequenceMeta.Exception.UnableToReadStepInfo
- AddSequenceMeta.Exception.UnableToSaveStepInfo
- AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/6fed6f0697c5332b.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/RepositoryImporter.java:319
* @param importRules
* import rules to validate against.
* @param subject
* @throws KettleException
*/
public static void validateImportedElement( ImportRules importRules, Object subject ) throws KettleException {
List<ImportValidationFeedback> feedback = importRules.verifyRules( subject );
List<ImportValidationFeedback> errors = ImportValidationFeedback.getErrors( feedback );
if ( !errors.isEmpty() ) {
StringBuilder message =
new StringBuilder( BaseMessages.getString( PKG, "RepositoryImporter.ValidationFailed.Message", subject
.toString() ) );
message.append( Const.CR );
for ( ImportValidationFeedback error : errors ) {
message.append( " - " );
message.append( error.toString() );
message.append( Const.CR );
}
throw new KettleException( message.toString() );
}
}
@Override
public void addLog( String line ) {
log.logBasic( line );
}
@Override
public void setLabel( String labelText ) {
log.logBasic( labelText );
}
@Override
public boolean transOverwritePrompt( TransMeta transMeta ) {
return overwrite;
}
View on GitHub (pinned to f3058517a1)