pentaho/pentaho-kettle · error · KettleException
Error while exporting repository jobs
Error message
Error while exporting repository jobs
What it means
RepositoryExporter.exportJobs iterates repository directory tree exporting jobs to the ExportWriter. Any exception during job export (repository lookup, loading a job's metadata, XML generation) is wrapped in a KettleException "Error while exporting repository jobs"; the writer's closeJob() runs in finally. The original exception is preserved as the cause.
Solutions
- Inspect the cause chain to find the specific job/directory that failed; try exporting a narrower directory to isolate it.
- Fix or remove the corrupt job entry in the repository database.
- Verify repository DB connectivity and that all plugins referenced by the jobs are installed.
- Check read permissions on the repository directories being exported.
- Retry the export after resolving; partial output from the failed run should be discarded.
Example fix
// before: whole-repo export aborts on one bad job
exporter.exportAllObjects(monitor, "all.xml", null, RepositoryExportType.ALL);
// after: narrow the scope to isolate the failing directory
try {
exporter.exportAllObjects(monitor, "all.xml", null, RepositoryExportType.ALL);
} catch (KettleException e) {
log.error("Export failed; cause:", e); // cause names the failing job
// re-run per directory via exportAllObjectsWithFeedback to skip the broken one
} Defensive patterns
Strategy: try-catch
Validate before calling
// verify repository connectivity and plugin availability before export
repository.test();
if (repository.connect(user, pass) == null) throw new IllegalStateException("Repository not connected"); Try / catch
try { exporter.exportAllObjects(monitor, file, null, RepositoryExportType.ALL); } catch (KettleException e) { Throwable cause = e; while (cause.getCause() != null) cause = cause.getCause(); log.error("Job export failed; root cause: " + cause, e); } Prevention
- Test repository connection before large exports
- Install all job-referenced plugins on the exporting instance
- Export directory-by-directory to limit blast radius of a corrupt job
- Maintain repository database health checks
When it happens
Trigger: Calling exportAllObjects/exportAllObjectsWithFeedback with jobs included when reading a job from the repository throws — e.g. loadRepositoryObject failure, corrupt job metadata in the repository database, or export XML serialization errors for a specific job.
Common situations: Repository database containing jobs referencing missing database connections or plugins; permission problems reading certain repository directories; network/DB connectivity drop mid-export; a single broken job aborting a whole-repository export.
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 while exporting repository transformations
- AccessInputMeta.Exception.ErrorSavingToRepository
- CloneRowMeta.Exception.UnexpectedErrorReadingStepInfo
- ColumnExistsMeta.Exception.UnableToSaveStepInfo
- ColumnExistsMeta.Exception.UnexpectedErrorReadingStepInfo
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/2dca183cb417a380.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/repository/RepositoryExporter.java:268
monitor.registerRuleViolation();
writer.registerRuleViolation();
}
// do we need any feedback on this action?
if ( feedback ) {
ExportFeedback fb = new ExportFeedback();
fb.setType( ExportFeedback.Type.JOB );
fb.setItemName( jobMeta.getName() );
fb.setItemPath( dirPath );
ExportFeedback.Status status =
errors.isEmpty() ? ExportFeedback.Status.EXPORTED : ExportFeedback.Status.REJECTED;
fb.setStatus( status );
fb.setResult( errors );
this.feedbackList.add( fb );
}
}
}
} catch ( Exception e ) {
throw new KettleException( "Error while exporting repository jobs", e );
} finally {
writer.closeJob();
}
}
private void cancelMonitorAction( ExportWriter writer ) throws IOException {
// delete file
writer.registerRuleViolation();
// clear feedback list
if ( feedbackList != null ) {
feedbackList.clear();
}
}
private List<ImportValidationFeedback> validateObject( Object subject, boolean boolFeedback ) throws KettleException {
if ( !hasRules ) {
return Collections.emptyList();
}View on GitHub (pinned to f3058517a1)