{"record":{"id":"0effbee817e1a317","repo":"pentaho/pentaho-kettle","slug":"aggregaterowsmeta-exception","errorCode":"AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo","errorMessage":"AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo","messagePattern":"AggregateRowsMeta\\.Exception\\.UnexpectedErrorWhileReadingStepInfo","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"plugins/aggregate-rows/core/src/main/java/org/pentaho/di/trans/steps/aggregaterows/AggregateRowsMeta.java","lineNumber":285,"sourceCode":"\n    return retval.toString();\n  }\n\n  @Override\n  public void readRep( Repository rep, IMetaStore metaStore, ObjectId id_step, List<DatabaseMeta> databases ) throws KettleException {\n\n    try {\n      int nrfields = rep.countNrStepAttributes( id_step, \"field_name\" );\n\n      allocate( nrfields );\n\n      for ( int i = 0; i < nrfields; i++ ) {\n        fieldName[i] = rep.getStepAttributeString( id_step, i, \"field_name\" );\n        fieldNewName[i] = rep.getStepAttributeString( id_step, i, \"field_rename\" );\n        aggregateType[i] = getType( rep.getStepAttributeString( id_step, i, \"field_type\" ) );\n      }\n    } catch ( Exception e ) {\n      throw new KettleException( BaseMessages.getString(\n        PKG, \"AggregateRowsMeta.Exception.UnexpectedErrorWhileReadingStepInfo\" ), e );\n    }\n\n  }\n\n  @Override\n  public void saveRep( Repository rep, IMetaStore metaStore, ObjectId id_transformation, ObjectId id_step ) throws KettleException {\n    try {\n      for ( int i = 0; i < fieldName.length; i++ ) {\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_name\", fieldName[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_rename\", fieldNewName[i] );\n        rep.saveStepAttribute( id_transformation, id_step, i, \"field_type\", getTypeDesc( aggregateType[i] ) );\n      }\n    } catch ( KettleException e ) {\n      throw new KettleException( BaseMessages.getString( PKG, \"AggregateRowsMeta.Exception.UnableToSaveStepInfo\" )\n        + id_step, e );\n    }\n  }","sourceCodeStart":267,"sourceCodeEnd":303,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/plugins/aggregate-rows/core/src/main/java/org/pentaho/di/trans/steps/aggregaterows/AggregateRowsMeta.java#L267-L303","documentation":"AggregateRowsMeta.readRep loads the step's configuration from a repository (database) instead of XML and throws KettleException with this localized message when repository attribute reads fail. It indicates the step metadata could not be reconstructed from stored repository attributes.","triggerScenarios":"readRep is called while the repository connection fails mid-query, rep.getStepAttributeString throws a database error, or stored field_type values cannot be mapped by getType.","commonSituations":"Repository database unavailable or schema mismatch after a PDI upgrade; corrupted repository rows for the step; concurrent modification of the transformation while loading.","solutions":["Check repository database connectivity and credentials; retest the load.","Open the transformation in Spoon, verify the Aggregate Rows step config, and re-save to rewrite repository attributes.","Inspect the wrapped KettleException cause for the underlying database error.","After a PDI upgrade, run the repository upgrade/migration scripts before loading transformations."],"exampleFix":"// before\nTransMeta transMeta = new TransMeta(rep, \"myTrans\", repoDir); // KettleException on bad repo rows\n// after\ntry {\n  TransMeta transMeta = new TransMeta(rep, \"myTrans\", repoDir);\n} catch (KettleException e) {\n  log.error(\"Step info unreadable from repository: \" + e.getCause());\n  // fix repo connectivity or re-save the step in Spoon, then retry\n}","handlingStrategy":"retry","validationCode":"// Verify repository connectivity before loading\nif (!rep.connect(...)) throw new IllegalStateException(\"Repository unavailable\");","typeGuard":null,"tryCatchPattern":"try {\n  meta.readRep(rep, ...);\n} catch (KettleException e) {\n  logger.error(\"Repository read failed: \" + e.getCause(), e);\n  // check DB connectivity / re-save step in Spoon, then retry once\n}","preventionTips":["Run repository schema upgrade scripts after PDI upgrades.","Monitor repository database health before batch transformation loads.","Re-save the step via Spoon if its repository attributes look stale or corrupted."],"tags":["kettle","repository","step-metadata","database"],"backgroundTag":"database-query-failed","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}