pentaho/pentaho-kettle · error · KettleException
SASInputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository
SASInputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository
Error message
SASInputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository
What it means
readRep loads SasInputMeta from a repository (instead of XML); if reading step attributes or constructing SasInputField entries fails, it wraps the exception in a KettleException with the localized message 'SASInputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository'.
Solutions
- Check the chained cause for the repository failure (connection, SQL, missing rows).
- Verify repository connectivity and that R_* tables exist and are up to date for the Pentaho version.
- Reopen and re-save the step's metadata to repopulate attributes.
- Recreate the step in the transformation if repository attributes are corrupt or missing.
Example fix
// before: repository missing 'field_name' attribute rows for the step // after: open the step in Spoon, reselect fields, and save back to the repository
Defensive patterns
Strategy: try-catch
Validate before calling
// Verify repository health before loading metadata
if (!rep.isConnected()) throw new IllegalStateException("Repository not connected");
if (!rep.getSecurityProvider() != null && !stepExists(rep, stepId)) throw new IllegalStateException("Step attributes missing in repository"); Try / catch
try {
stepMeta.readRep(rep, metaStore, stepId, databases);
} catch (KettleException e) {
if (e.getMessage().contains("UnexpectedErrorReadingMetaDataFromRepository")) {
// check repository connectivity/schema, then recreate or re-save the step metadata
}
throw e;
} Prevention
- Keep the repository schema migrated to the PDI version in use.
- Test repository connectivity before running metadata-driven jobs.
- Re-save steps after PDI upgrades so attribute rows match the current plugin's expectations.
When it happens
Trigger: Exception thrown in readRep while querying repository step attributes (rep.countNrStepAttributes, attribute lookups) or building SasInputField(rep, stepId, i) — e.g. repository connection issues or missing attribute rows.
Common situations: Repository database unavailable or schema out of sync with the Pentaho version; step metadata partially deleted from the repository; plugin version mismatch where saved attribute keys changed; permission problems on repository tables.
Understand the failure class
Background: Database query failed: Internal Server Error 500s wrapping SQL, Prisma, and connection failures — what to check first — this error's family across 16 libraries.
Related errors
- ElasticSearchBulkMeta.Exception.ErrorReadingRepository
- ElasticSearchBulkMeta.Exception.ErrorSavingToRepository
- GPLoadMeta.Exception.UnexpectedErrorReadingStepInfoFromRepos…
- JobEntryMSAccessBulkLoad.Meta.UnableLoadRep
- JsonInputMeta.Exception.ErrorReadingRepository
AI-assisted analysis of pentaho/pentaho-kettle@f3058517a1 (2026-09-13).
Data as JSON: /api/errors/3330441263fb859b.
Report an issue: GitHub.
Appendix: source
Thrown at engine/src/main/java/org/pentaho/di/trans/steps/sasinput/SasInputMeta.java:137
for ( SasInputField field : outputFields ) {
retval.append( XMLHandler.openTag( XML_TAG_FIELD ) );
retval.append( field.getXML() );
retval.append( XMLHandler.closeTag( XML_TAG_FIELD ) );
}
return retval.toString();
}
public void readRep( Repository rep, IMetaStore metaStore, ObjectId stepId, List<DatabaseMeta> databases ) throws KettleException {
try {
acceptingField = rep.getStepAttributeString( stepId, "accept_field" );
outputFields = new ArrayList<SasInputField>();
int nrFields = rep.countNrStepAttributes( stepId, "field_name" );
for ( int i = 0; i < nrFields; i++ ) {
outputFields.add( new SasInputField( rep, stepId, i ) );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "SASInputMeta.Exception.UnexpectedErrorReadingMetaDataFromRepository" ), e );
}
}
public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {
try {
rep.saveStepAttribute( id_transformation, id_step, "accept_field", acceptingField );
for ( int i = 0; i < outputFields.size(); i++ ) {
outputFields.get( i ).saveRep( rep, metaStore, id_transformation, id_step, i );
}
} catch ( Exception e ) {
throw new KettleException( BaseMessages.getString(
PKG, "SASInputMeta.Exception.UnableToSaveMetaDataToRepository" )
+ id_step, e );
}
}
public void check( List<CheckResultInterface> remarks, TransMeta transMeta, StepMeta stepMeta,View on GitHub (pinned to f3058517a1)